You are not logged in.

#1 2004-06-03 17:18:06

banana989
Member
Registered: 2004-06-03
Posts: 60

MySqlD

Hi, I'm having a bad problem with my sql server. It seems as though, I connect to mysql (from a webpage- phpbb), mysqld gets new instances and they never get closed, even when i exit the browser. Eventually my kernel "runs out of memory" and kills mysqld .. here is what i'm talking about

[*******@archlinux log]$ ps -A | grep -c mysqld
17
connect to db
[*******@archlinux log]$ ps -A | grep -c mysqld
19

an exerpt from the kernel log(there are 95 of these):

kernel:Jun  3 10:21:40 archlinux kernel: Out of Memory: Killed process 857 (mysqld).
kernel:Jun  3 10:21:40 archlinux kernel: Out of Memory: Killed process 858 (mysqld).
kernel:Jun  3 10:21:40 archlinux kernel: Out of Memory: Killed process 859 (mysqld).
kernel:Jun  3 10:21:40 archlinux kernel: Out of Memory: Killed process 860 (mysqld).
kernel:Jun  3 10:21:40 archlinux kernel: Out of Memory: Killed process 861 (mysqld).
kernel:Jun  3 10:21:40 archlinux kernel: Out of Memory: Killed process 865 (mysqld).
kernel:Jun  3 10:21:40 archlinux kernel: Out of Memory: Killed process 866 (mysqld).
kernel:Jun  3 10:21:40 archlinux kernel: Out of Memory: Killed process 869 (mysqld).
kernel:Jun  3 10:21:40 archlinux kernel: Out of Memory: Killed process 873 (mysqld).
kernel:Jun  3 10:21:40 archlinux kernel: Out of Memory: Killed process 874 (mysqld).

is there a way to make sure that each connection times out ? or is disconnected ?

Offline

#2 2004-06-06 22:19:42

marco
Member
Registered: 2004-06-04
Posts: 18

Re: MySqlD

I know, that closing the browser will not make the processes go away. Do you know things about sockets? (Ah, you do connect via network, don't you?)

Isn't it unusual that mysqld creates new processes for each query? Wouldn't it be better to create a new thread to handle them? Or like apache: Have a fixed set of processes that handle requests (usually 5 or so)? I guess you took an arch-package (pacman) to install. Might it be compiled with some option which causes this behavior? I even heard from mysql that you should not compile it yourself, and if, only with special versions of gcc.

Another thing. That php webpage. It could have bugs, did you conside that? Moreover you should check whether mysql_pconnect() works better for you. I don't know much about it, but i think not as many connections are opened with it as with mysql_connect().

I don't know, maybe that helps. Maybe not.

Offline

#3 2004-06-07 08:00:13

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: MySqlD

things you could try:


turn of persistent connections in php.ini -- see if that changes anything
make sure the default socket is set correctly in php.ini (/tmp/mysql.sock...or something like that)



dunno what else right now..I am tired and my brain quit working an hour ago...
ZZzzz


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#4 2004-06-07 14:08:52

banana989
Member
Registered: 2004-06-03
Posts: 60

Re: MySqlD

I turned off persistent connections, it seems to be working, but I'll be sure to post here if it doesn't. Thanks for your help.

Offline

Board footer

Powered by FluxBB