System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Mysql memory leak on hpux 11.23

lcleng
Occasional Visitor

Mysql memory leak on hpux 11.23

Hi,
I got the following error messages while connect to mysql4.1.17 on hpux 11.23, around 3000 processes, see below:

Mysql connect('database=user;host=enghp2','root',...) failed: Can't create a new thread (errno 11); if you are not out of available memory,
you can consult the manual for a possible OS-dependent bug at ./testconn.pl line 19

I have been adjust the max open files limit of mysql and kernel:
mysql> show variables like "open%";
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| open_files_limit | 65535 |
+------------------+-------+
1 row in set (0.00 sec)

[root@enghp2]:/etc > ulimit -a
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) 1048576
file size (blocks, -f) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 65535
pipe size (512 bytes, -p) 16
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 29001
virtual memory (kbytes, -v) unlimited

[root@enghp2]:/etc > kctune -a |grep dbc
dbc_max_pct 50 Default Immed
dbc_min_pct 5 Default Immed

The error message display while create more than 3000 sessions and the memory around 1083M:

[root@enghp2]:/ccrun/mysql4/bin > mysqladmin -ucci -pcci processlist |wc -l
3101

System: Tue Sep 22 20:20:45 2009
Load averages: 0.17, 0.27, 0.50
319 processes: 270 sleeping, 44 running, 4 stopped, 1 zombie
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.17 6.5% 0.8% 11.7% 81.0% 0.0% 0.0% 0.0% 0.0%
1 0.17 8.3% 1.4% 11.1% 79.1% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.17 7.4% 1.0% 11.5% 80.1% 0.0% 0.0% 0.0% 0.0%

Memory: 2659044K (1663340K) real, 4678212K (3288376K) virtual, 472592K free Page# 1/9

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
0 pts/11 16001 cis 152 20 1029M 415M run 0:13 1.59 1.59 mysqld



2 REPLIES
Suraj K Sankari
Honored Contributor

Re: Mysql memory leak on hpux 11.23

Hi,

Could you post swapinfo -tam

Suraj
Dennis Handly
Acclaimed Contributor

Re: Mysql memory leak on hpux 11.23

>Can't create a new thread (errno 11);

This is EAGAIN 11 No more processes

You need to increase nproc or maxuprc.
What are their values?
Doing "kcusage nproc" would be helpful.
And possibly nkthread.