Results 1 to 15 of 15
  1. #1

    problems with Java on VPS (tomcat)

    Hi,

    Has anyone had problems running Java on a VPS account?

    I'm using Tomcat for my web application, and when I start tomcat I get nearly 20 java jvms running at the same time!

    Then I end up running into memory problems... Because of the memory problems I cannot shutdown the web server using "catalina.sh stop". In order to restart tomcat I have to reboot the VPS! I also have problems ssh'n into the server too when this happens.

    I have other java issues too, like when I try to use javac I get:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.

    Even though there are no java processes running (tomcat shutdown, and server freshly rebooted).

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,601
    Have you contacted your host to see if they can change something on the VPS settings?

    Rus
    Russ Foster - Industry Curmudgeon

  3. #3
    The host tried tweaking the "privvmpages" setting in Virtuozzo but it didn't help.

  4. #4
    Join Date
    Jun 2005
    Posts
    448
    SiVA,

    How much guaranteed RAM do you have on your VPS? Tomcat doesn't run quite well in a VPS environment as it has tendency to consume all available RAM (which in most cases isn't higher than 512 MB) and cause problems like you're facing. The best option would be to either upgrade your current VPS plan or to get a dedicated server.
    Have a question?

  5. #5
    My gaurenteed ram is 128.

    I guess I'll have to come up with some other solution.

  6. #6
    Join Date
    Jun 2005
    Posts
    448
    Ouch, you should definitely upgrade to a higher package as there is no possible way you'll be able to run Tomcat properly.
    Have a question?

  7. #7
    what's the minimum you'd recommend?

  8. #8
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,574
    Whoa, upgrade to the 256MB package at least.

    GSV
    MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  9. #9
    Even if I upgrade, this doesn't explain why I have 50 JVMS in the process list?

    it seems there's some configuration problem...

    Note: I've tried java 1.4.02 and 1.5

  10. #10
    Join Date
    Jun 2005
    Posts
    448
    From what I know, you should have no trouble with jdk 1.4. Same goes for Tomcat 5.5.7. Was that installed via template?
    Have a question?

  11. #11
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,574
    Originally posted by SiVA
    Even if I upgrade, this doesn't explain why I have 50 JVMS in the process list?

    it seems there's some configuration problem...

    Note: I've tried java 1.4.02 and 1.5
    I've never used Java but, you certainly can check the configuration to change the number of threads that it opens. That may help slightly.

    GSV
    MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  12. #12
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    881
    Java tends to spawn alot of threads, if you use a 2.6 kernel and nptl you would probally get much better results. And I agree that upgrading is a good idea, 128MB ram is simply not enough.

  13. #13
    Join Date
    Jul 2003
    Location
    Earth
    Posts
    1,692
    Originally posted by elix
    Whoa, upgrade to the 256MB package at least.
    No way! At least 512 RAM (VPS) if you're not running other resource-intensive web sites, but anyway I strongly recommend you to use either a VPS with at least 768 RAM or a dedicated server... if you want *decent* performance.

    We do JSP/Tomcat hosting, with servers with at least 2 GB RAM, and let me tell you Tomcat takes almost of RAM available.

  14. Dont even try. Java is not for VPSes.

    Even on my underpopulated P4 server with 1GB RAM, it was draining a big chunk of resources and constantly pushing the server load to the north. I had to disable it right away.
    What you can do with Cpanel ------------------> |||||
    What you can do with Cpanel XP+CpanelAPP -------> ||||||||||||||||||||||||||||||||||||||||

    Your competitors are cashing in with Cpanel XP & CpanelAPP, are you?

  15. #15
    Join Date
    May 2004
    Posts
    394
    Try using Jetty instead of Tomcat, no automated installs, so you've got to do everything your self. I used to run java on my VPS and host some JSP sites, and I had customers who hosted JSP sites on their VPS too.. Its fine to have Java on your VPS. We use UML for VPS.. 128MB of RAM is fine to have JSP hosting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •