2

I am newbie to Linux and Centos6. I bought server just now and want to deploy my web app in it. I am getting error while I am compiling my servlet classes. It showing me bash: javac: command not found when I try to compile my classes. But when I checked my class in '/usr/lib/jvm/java-1.6.0/bin .'I found my javac there. Then I checked javac with the help of command ./javac i got ERROR

[root:ip_address.com]# ./javac
# There is insufficient memory for the Java Runtime Environment to continue.
# pthread_getattr_np
Error occurred during initialization of VM
    java.lang.OutOfMemoryError: unable to create new native thread

I followed the step as shown in "" Java `OutOfMemoryError` when creating < 100 threads "" which shows me command to get limits..

'[root:ipaddress.com]#  ulimit -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 278528
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited'

[root:ipaddress.com]#  top
bash: top: command not found
Community
  • 1
  • 1
AJIT RANA
  • 31
  • 7
  • It sounds like you are running out of virtual memory. How much memory does the machine have and how much free swap space do you have? – Peter Lawrey Oct 16 '12 at 11:40
  • 20gb with 1 gb ram aerver.. centos6 operating system – AJIT RANA Oct 16 '12 at 13:08
  • You have a limit of `1024` processes which I suspect limits the number of threads you have as well. How many threads do you have currently? – Peter Lawrey Oct 16 '12 at 13:11
  • 38 threads are running i got to know from 'ps -elf' commands – AJIT RANA Oct 16 '12 at 13:52
  • I think this shows all the processes. try `ps -eLf` note the `L` – Peter Lawrey Oct 16 '12 at 13:54
  • 'root 29751 29701 29751 0 1 06:57 pts/0 00:00:00 ps -eLf' – AJIT RANA Oct 16 '12 at 13:59
  • thats what this showing this to me. – AJIT RANA Oct 16 '12 at 14:02
  • When I do a `ps -eLf | grep $USER | wc -l` on RHEL I get a number like 283 – Peter Lawrey Oct 16 '12 at 14:05
  • i did it same in centos6 i got '[root@ip_address /]# ps -eLf | grep $USER | wc -l -bash: wc: command not found' – AJIT RANA Oct 16 '12 at 14:13
  • You appear to have a number of basic commands missing. Can you install `top` and `wc` ? – Peter Lawrey Oct 16 '12 at 14:18
  • i tried with the help of 'yum install top' but i got error 'bash: yum : command not found' – AJIT RANA Oct 16 '12 at 14:28
  • Any Help to sort out above issue – AJIT RANA Oct 17 '12 at 13:41
  • I am pretty sure that not a programming question. Perhaps superuser.com is a better place for setting up your system correctly. I assume you were running this as `root`? – Peter Lawrey Oct 17 '12 at 13:42
  • Hello Peter My Server memory output Says 'Total =1.00gb ,, Used =1.0 Gb Free =0.00B ' What Is this meaning.?? – AJIT RANA Oct 19 '12 at 23:21
  • After Trying Hard Day and night I solved Some Of problem And Got To know My Tomcat Configuration Is Eating My 641Mb of Memory.. How Can I change My Tomcat Config So that It eat less Memory ...??? Need to review Tomcat configuration to determine why it is using all memory ..?? – AJIT RANA Oct 20 '12 at 00:00
  • Given 16 GB can cost < $100 I seriously suggest you get more memory. For the time you save it will more than pay for itself. You can use memory profiling to minimise your memory consumption, but this could take you a while if you are not in the habit of doing this with a commercial profiler. It would be simpler and possibly cheaper just to get more memory – Peter Lawrey Oct 20 '12 at 08:29
  • I have Disk space of 20 gb and RAM of 1 GB..Is not it enough. – AJIT RANA Oct 20 '12 at 10:28
  • It depends on your application, but you should consider spending a bit more on hardware and saving you time trying to get your application to fit in such a small machine. – Peter Lawrey Oct 20 '12 at 11:43
  • Hello Peter... I have got another issue now... 'http://stackoverflow.com/questions/13008029/domain-name-does-not-pointing-to-installed-java-webapplication-in-parallel-plesk' – AJIT RANA Oct 22 '12 at 21:38

0 Answers0