01-13-2011
shmget failed - cannot allocate memory
Hi,
In my proj, one process was running for 2 days. after 2 days its throwing an error message "shmget failed cannot allocate memory". the same problem happened every time.i.e. i can reproduce the same issue if my process is running for every 2 days for a same operation.Within this 2 days there are 2500 operation were completed. after ~2500 operation this problem occured every time.once it thrown an error from then on(from the next operation) the same error was thrown continuosously.
my process name is Server.
the top command output for my process at the time when the problem occured.
=======================================================
top - 01:14:10 up 6 days, 1:23, 7 users, load average: 0.99, 1.03, 1.12
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 26.5%us, 1.4%sy, 0.0%ni, 71.9%id, 0.0%wa, 0.2%hi, 0.1%si, 0.0%st
Mem: 4055852k total, 4025864k used, 29988k free, buffers
Swap: 4200444k total, 4200408k used, 36k free, 512380k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24403 root 20 0 2904m 1.0g 3228 S 0 25.7 162:28.16 Server
=======================================================
RAM size is 4GB.
Is it because of memory leak? or for the 4GB memory it can be supported only 2500 operation?
free command output:
free -m
total used free shared buffers cached
Mem: 3960 3841 119 0 44 921
-/+ buffers/cache: 2874 1086
Swap: 4101 255 3846
Regards,
Mani
P.S: the top command output for the same process one day back:
top - 10:20:52 up 5 days, 10:29, 4 users, load average: 1.55, 1.51, 1.49
Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie
Cpu(s): 26.6%us, 1.3%sy, 0.0%ni, 71.6%id, 0.3%wa, 0.1%hi, 0.1%si, 0.0%st
Mem: 4055852k total, 3980588k used, 75264k free, 16448k buffers
Swap: 4200444k total, 3580824k used, 619620k free, 661580k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24403 root 20 0 2510m 999m 6164 S 0 25.2 140:05.11 Server
10 More Discussions You Might Find Interesting
1. Programming
Hi Folks
can any body suggest how to allocate virtual memory any function for that (2 Replies)
Discussion started by: munnu
2 Replies
2. UNIX for Advanced & Expert Users
On SunOS 5.8 I get an error when starting a large Java process with over 2Gb memory.
Error occurred during initialization of VM
Could not reserve enough space for object heap
When stopping several other Java processes we can start this process. This seems to indicate that we don't have... (11 Replies)
Discussion started by: rein
11 Replies
3. UNIX for Advanced & Expert Users
Hi,
I have 2 systems with same hardware and software. One system is giving me error "Error occurred during initialization of VM Could not reserve enough space for object " when I tried to increase JBoss App's heap size to 2GB while the other system is running fine without any issue. Is there... (5 Replies)
Discussion started by: ravi3553
5 Replies
4. UNIX for Advanced & Expert Users
hi... i want to find oracle allocate how many memory really..
i execute this code to list memory on unix system : ps -eo pmem,args | sort -k 1 -r -n
outputs ;
%mem command
12.9|ora_smon_RTX
12.9|ora_s000_RTX
12.9|ora_reco_RTX
12.9|ora_qmnc_RTX... (2 Replies)
Discussion started by: utoptas
2 Replies
5. SuSE
Hi,
My program was running for a whole night. after 12 hours i got an error message "Cannot allocate memory" during the shmat commmand. So can you please let me know what could be the reason? is there any solution?
thanks in advance.
Regards,
Mano (5 Replies)
Discussion started by: ManoharanMani
5 Replies
6. Linux
Hi,
In my proj, one process was running for 2 days. after 2 days its throwing an error message "shmget failed cannot allocate memory". the same problem happened every time.i.e. i can reproduce the same issue if my process is running for every 2 days for a same operation.Within this 2 days there... (1 Reply)
Discussion started by: ManoharanMani
1 Replies
7. Linux
Hi,
In my proj, one process was running for 2 days. after 2 days its throwing an error message "shmget failed cannot allocate memory". the same problem happened every time.i.e. i can reproduce the same issue if my process is running for every 2 days for a same operation.Within this 2 days there... (1 Reply)
Discussion started by: ManoharanMani
1 Replies
8. Programming
hi
I want to take string as a input from user and the string is very very length. From the lengthy string i have to substring take first 16 letters, then next 8 letters,................... Please guide me how to write program to take lengthy string from user and sub string it.
Thanks (4 Replies)
Discussion started by: atharalikhan
4 Replies
9. Solaris
On SunOS 10 get an error when starting a large Java process with over 2Gb memory.
Error occurred during initialization of VM
Could not reserve enough space for object heap
i have 32G memory !! , swap = 31G
Please any advice !!! (3 Replies)
Discussion started by: moata_u
3 Replies
10. Programming
Hi , experts.
I work on Linux station (RedHat 5.7), regular user, but have root password.
%> uname -a
Linux ran1log06 2.6.18-238.1.1.el5 #1 SMP Tue Jan 4 13:32:19 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
%> cat /etc/issue
Red Hat Enterprise Linux Client release 5.7 (Tikanga)
Kernel \r on... (5 Replies)
Discussion started by: baruchgu
5 Replies
iotop(1m) USER COMMANDS iotop(1m)
NAME
iotop - display top disk I/O events by process. Uses DTrace.
SYNOPSIS
iotop [-C] [-D|-o|-P] [-j|-Z] [-d device] [-f filename] [-m mount_point] [-t top] [interval [count]]
DESCRIPTION
iotop tracks disk I/O by process, and prints a summary report that is refreshed every interval.
This is measuring disk events that have made it past system caches.
Since this uses DTrace, only users with root privileges can run this command.
OPTIONS
-C don't clear the screen
-D print delta times - elapsed, us
-j print project ID
-o print disk delta times, us
-P print %I/O (disk delta times)
-Z print zone ID
-d device
instance name to snoop (eg, dad0)
-f filename
full pathname of file to snoop
-m mount_point
mountpoint for filesystem to snoop
-t top print top number only
EXAMPLES
Default output, print summary every 5 seconds
# iotop
One second samples,
# iotop 1
print %I/O (time based),
# iotop -P
Snoop events on the root filesystem only,
# iotop -m /
Print top 20 lines only,
# iotop -t 20
Print 12 x 5 second samples, scrolling,
# iotop -C 5 12
FIELDS
UID user ID
PID process ID
PPID parent process ID
PROJ project ID
ZONE zone ID
CMD command name for the process
DEVICE device name
MAJ device major number
MIN device minor number
D direction, Read or Write
BYTES total size of operations, bytes
ELAPSED
total elapsed times from request to completion, us (this is the elapsed time from the disk request (strategy) to the disk completion
(iodone))
DISKTIME
total times for disk to complete request, us (this is the time for the disk to complete that event since it's last event (time
between iodones), or, the time to the strategy if the disk had been idle)
%I/O percent disk I/O, based on time (DISKTIME)
load 1 minute load average
disk_r total disk read Kb for sample
disk_w total disk write Kb for sample
DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
iotop will run forever until Ctrl-C is hit, or the specified interval is reached.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO
iosnoop(1M), dtrace(1M)
version 0.75 Oct 25, 2005 iotop(1m)