hrcerqueira
Trekkie

Offline
Posts: 11
|
 |
« on: March 05, 2007, 07:32:49 PM » |
|
Hello, i'm trying to upgrade the jdk on my vps to 1.6, because i developed a site using tapestry and i used annotations that it's java 1.5+ feature.
My current jdk version is 1.4.2. I installed the new version following the instructions at avaiable at sun's site, but i can't get tomcat to use the new version, seems that just setting the environment variable JAVA_HOME isn't enough.
Does anyone knows how to do it? The site is ready to deploy from one week now and i can't do it unless i upgrade my jdk...
Thanks in advance Hernāni Cerqueira
|
|
|
|
|
Logged
|
|
|
|
|
perestrelka
|
 |
« Reply #1 on: March 06, 2007, 11:05:38 PM » |
|
Hi,
May I know where you tried to specify JAVA_HOME?
Thanks.
|
|
|
|
|
Logged
|
Kind Regards, Vlad Artamonov
|
|
|
hrcerqueira
Trekkie

Offline
Posts: 11
|
 |
« Reply #2 on: March 06, 2007, 11:41:47 PM » |
|
At first i seted an environment variable, but after seeing the initialization scripts (by the way, it's a really weird tomcat implementation on vps's) i saw that they checked for JAVA_HOME at tomcat.conf. Now my problem is, vps doesn't have enough vmmpages to run jdk6. Unbeliavly, if we have tomcat running with 1.4.2 and go to command line and call "java -version", we got a "unnable to allocate heap space(or something like that)" error. Very weird indeed... But there's also a good chance of being me who screwed up. If anyone already accomplished this terrible task, please tell me how... I really need to upgrade jdk. I need to deploy a website built on tapestry that eavly relys on annotations, a java 1.5+ feature.
Best regards Hernāni
|
|
|
|
|
Logged
|
|
|
|
|
perestrelka
|
 |
« Reply #3 on: March 08, 2007, 12:01:04 AM » |
|
Hi,
I'm sorry, but it is not clear from your reply whether you were able to start Tomcat with new JDK or not after modifying JAVA_HOME in tomcat.conf.
As for the running a few java process simultaneously, for example, executing java from shell when a service writing in java is running, the second process fails because the most part of the memory is already used by the first one. You can try to play with -Xmx and -Xms parameters of java in order to reduce memory utilization and to able to start a few java processes.
|
|
|
|
|
Logged
|
Kind Regards, Vlad Artamonov
|
|
|
hrcerqueira
Trekkie

Offline
Posts: 11
|
 |
« Reply #4 on: March 20, 2007, 10:09:08 AM » |
|
Hello again, I've been long for a while, so I couldn't reply before. I hosted this particular site on a friends server, at least temporarly. I've tried the following: killed all the process's running on my vps. Once i had nothing running, i tried this very simple task (using jdk 1.6): java -version -Xmx=32m -Xms=32, and voila, the same error, unable to start jvm because of the heap space and bla bla. And wath really anoys me is that the support people solution is: upgrade to dedicated server. I have 3 webapps with very low trafic running on my vps, do I realy need to upgrade to DS?
Looks like that the problem realy is about server limitations. I saw a post about privvmpages before, well, check out the output of 'cat /proc/user_beancounters' on my vps:
Version: 2.5 uid resource held maxheld barrier limit failcnt 20024431: kmemsize 6507912 6526213 22111846 22754099 0 lockedpages 0 0 512 512 0 privvmpages 116356 116362 131072 139264 4159 shmpages 7081 7081 43008 43008 0 dummy 0 0 0 0 0 numproc 101 101 480 480 0 physpages 29201 29204 0 2147483647 0 vmguarpages 0 0 67584 2147483647 0 oomguarpages 29201 29204 52224 2147483647 0 numtcpsock 25 25 720 720 0 numflock 10 10 376 412 0 numpty 1 1 32 32 0 numsiginfo 0 0 512 512 0 tcpsndbuf 223600 223600 3440640 5406720 0 tcprcvbuf 409600 409600 3440640 5406720 0 othersockbuf 15652 15652 2252160 4194304 0 dgramrcvbuf 0 0 524288 524288 0 numothersock 17 17 720 720 0 dcachesize 540838 545550 6819840 7249920 0 numfile 2758 2767 18624 18624 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 dummy 0 0 0 0 0 numiptent 14 14 256 256 0
Why that huge failcnt value on the privvmpages?
|
|
|
|
|
Logged
|
|
|
|
|
perestrelka
|
 |
« Reply #5 on: March 21, 2007, 04:22:31 AM » |
|
Hi,
It looks like you didn't kill all the memory consuming processes. Was tomcat, apache or mysql running?
I don't see a reason why you can't host a few simple and not very popular webapps on the VPS plan, however, multiple concurrent Java processes are not available on VPS server due to the Java virtual machine memory allocation. In other words, you should not expect that you'll be able to run Tomcat and another Java process on full power in VPS environment.
|
|
|
|
|
Logged
|
Kind Regards, Vlad Artamonov
|
|
|
|