View Full Version : php/mysql errors??
palkat
16th March 2006, 19:53
My build is on a Suse9.3 with ispconfig 2.18
No Suse Updates ever done, original Suse9.3 install
i have a strange never before seen problem.
this happened to me on monday the 13th and again today.
the problem is:
- Emails get rejected
- php or mysql webpages generate errors like below
----------PHP/MYSQL ERROR---------
Warning: mysql_connect() [function.mysql-connect]: #HY000Can'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 in /home/www/web10/web/system/databases/mysql.class.php on line 112
Cannnot connect to DB server
-------------------------------------
- and when i log into ispconfig remotely i get the login screen and when i submit my user name and password i get 3 line of errors like the one above..(I don't have an excat copy of the 3 errors like above but they are similar and talk about php and mysql.
I have found if i restart ispconfig from my command line the problem goes away and email, php, mysql all run great!!!
but what would cause this? is there a bad module or something that now builds a stack and crashes???
oh yeah one last thing, last friday my proftp went down, and it would not comeback online via command line or ispconfig trying to turn the service back on. i had to reboot the server and it came back up. that was the only time that happened. what do you think, this is all strange on the 3 differant issues, kinda like currupt files or something.
Any input? would suse updates or ispconfig updates be of anyhelp or is this something else?
thanks!
till
16th March 2006, 22:54
How much memory do you ave in your server? How much swap space?
When you get these errors again, run the "top" command and see how much memory and swap is used.
palkat
16th March 2006, 23:49
Till, here is my current top readout...of course all is running okay right now.
top - 14:47:21 up 3:58, 3 users, load average: 0.61, 1.07, 1.13
Tasks: 116 total, 1 running, 115 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.0% us, 0.7% sy, 0.0% ni, 96.0% id, 0.0% wa, 0.3% hi, 0.0% si
Mem: 516008k total, 456360k used, 59648k free, 51452k buffers
Swap: 1036152k total, 0k used, 1036152k free, 241192k cac
Curious to see what you think..BTW: the hardware is a dell PowerEdge 2500 512meg RAM, (single) Xeon 1.4ghz cpu.
falko
17th March 2006, 12:52
Normally these errors occur if you run out of memory. So maybe you should have a look at your memory usage with top
palkat
18th March 2006, 04:57
being as im still new to linux how would the above top read out of my linux build look? good,bad, ok???
Today i also let suse do all the system updates for the first time sense i built the box 2 months ago, figures it couldn't hurt seeing there were new updates for php,apache,etc...
falko
18th March 2006, 11:12
The top output looks ok. You should have a look at the load. It seems a little bit high for a new server with no big web sites, etc.
If you have big web sites, lots of email etc. on the server, then the load is ok.
The memory and swap usage is ok.
palkat
19th March 2006, 05:11
Falko,
I do have about a dozen websites on the server and about 2 - 3 dozen email boxes that are in use. One website is a php chat room with a lot of traffic too but there was no traffic in the chat at the time of that TOP command.
THanks for your input on that...yesterday i did go ahead and download and install all the Suse9.3 updates that were available for the system and so far 1day 4hours on the server and okay..but usually the problem will happen after about 2-3 days so will keep ya posted.
palkat
21st March 2006, 18:20
It just happened again, this time the problem is Amin for ispconfig worked ok except till i did a whois under tools and got a lot of PHP errors.
I also noticed my ftp service was OFFLINE so i did a ispconfig /restart and my ftp service restarted and came back online and my who is under ispconfig worked.
how ever connecting to the ftp via a remote client just hung and timed out...had to reboot the server and everything worked great again.
below is a TOP dump at time of error before i took actions, also it has been exactly 3days 17hours sense last issue. so this is a pattern every 3 days the server freaks out...any advice????
top - 08:51:09 up 3 days, 17:20, 3 users, load average: 0.15, 0.08, 0.02
Tasks: 119 total, 1 running, 118 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.7% us, 0.7% sy, 0.0% ni, 97.7% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 516008k total, 486796k used, 29212k free, 77788k buffers
Swap: 1036152k total, 58976k used, 977176k free, 219756k cached
falko
21st March 2006, 19:11
Maybe you should check your cron jobs. Maybe there's one that runs every 3 or 4 days and causes these problems...
palkat
22nd March 2006, 03:55
okay php crash now and a reset of ispconfig does not fix it i have to reboot the system for a fix.
here is my current top read out at crash
top - 18:52:48 up 9:29, 3 users, load average: 0.06, 0.02, 0.00
Tasks: 111 total, 1 running, 110 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.4% us, 0.3% sy, 0.0% ni, 94.3% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 516008k total, 234260k used, 281748k free, 38320k buffers
Swap: 1036152k total, 65764k used, 970388k free, 72736k cached
here is the php errors i get (these errors are when you try to login to ispconfig ):
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 76
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 76
Warning: Cannot modify header information - headers already sent by (output started at /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php:76) in /home/admispconfig/ispconfig/web/login/login.php on line 56
so what do you think is causing this type of problem with my server???
(this sytem was built on Feb 1st and ran GREAT till march 10th when all this started, strange what would cause these problems all of a sudden. no new domains were added sense the 1st just the same 9 domains that were put on back on feb 1st)
please advice.
till
22nd March 2006, 09:00
so what do you think is causing this type of problem with my server???
The problem is that ISPConfig is unable to connect to your mySQL database.
Is mySQL runing?
Have you updated mysql or the mysql client libraries?
palkat
22nd March 2006, 16:27
I have not updated anything sense the build until 5 days ago after all this started. and then the only thing i updates was done via the apt-get update command you mentioned on another thread for system updates.
but again this happened before i did those updates.
As for if mysql was running when ispconfig and the websites could not connect to mysql i failed to do a netstat -tap next time i will but waiting for this to happen is just frustrating and is ticking off customers.
* don't know if this has anything to do with it all but i had a netgear 624 wireless router setup on my network as a WAP only not router and that unit cause random issues with even WIRED pcs on the network...yesterday the first problem of the FTP stoping i disconnected the netgear router from the network and am leaving it off because not only did the ftp server stop running on the linux server but i could not also surf to a web page on the linux server. once i disconnected the netgear 624 from the network and did a ispconfig restart i could surf on the linux server to web sites and the ftp server came back on...it wasnt till hours later that ispconfig could not talk to mysql...so i wonder if just MAYBE it was all (even delayed) part of a crash caused by that netgear router i took off and (and am LEAVING OFF) the network. guess time will tell on that also...just wanted to throw that out there as that netgear router has caused me all kinds of trouble*
falko
22nd March 2006, 17:44
* don't know if this has anything to do with it all but i had a netgear 624 wireless router setup on my network as a WAP only not router and that unit cause random issues with even WIRED pcs on the network...yesterday the first problem of the FTP stoping i disconnected the netgear router from the network and am leaving it off because not only did the ftp server stop running on the linux server but i could not also surf to a web page on the linux server. once i disconnected the netgear 624 from the network and did a ispconfig restart i could surf on the linux server to web sites and the ftp server came back on...it wasnt till hours later that ispconfig could not talk to mysql...so i wonder if just MAYBE it was all (even delayed) part of a crash caused by that netgear router i took off and (and am LEAVING OFF) the network. guess time will tell on that also...just wanted to throw that out there as that netgear router has caused me all kinds of trouble*
This has nothing to do with your problem. This WAP device might prevent you from accessing the Linux box, but it doesn't stop services on your Linux system (unless the WAP device knows a backdoor to your Linux system :D ).
palkat
22nd March 2006, 21:25
thanks Falko and Till, i figured that about the WAP.
Is there anything i can do or check in the meantime to find out why the mysql did what it has been doing at random??? I would just like to try everything possible so i don't have to wait every few days for this problem to happen.
and in the event when my mysql problem happens again what should i do at the time to get info to help you help me???
thanks!
falko
23rd March 2006, 01:27
Have a look at your log files. Usually they contain some hints why this or that happened.
Maybe you should also scan your system for rootkits: http://www.howtoforge.com/faq/1_38_en.html
palkat
23rd March 2006, 02:59
thanks falko,
i didn't see anything really in the log file that hinted at sql error to me, but im so new at all this...
I did do chkrootkit and rkhunter neither one found a single thing. so back to wait and see i guess.
** is there a way to do a complete system virus scan with suse9.3?
falko
23rd March 2006, 09:54
** is there a way to do a complete system virus scan with suse9.3?
Have a look at ClamAV: www.clamav.net
palkat
24th March 2006, 05:46
Tonight just a minute ago when i was on a remote machine and went to login to ispconfig it locked the server and i was just on a website that is on the same server just before going into ispconfig. so had to reboot the server because the whole server was physically locked. This kinda seems like a viral only because this server was built 2 months ago and ran nonstop till about 2 weeks ago now.
I have spent a while on clamav.net and can not get the gui frontends to install on my suse9.3 for one reason or another.
I have finally got it running a CLAMSCAN -r / on the whole system drive...will see about the results.. if no viruses are found im really stumpped as to what can be causing these issues and why now when it all ran for 6 weeks perfectly.
falko
24th March 2006, 09:34
Tonight just a minute ago when i was on a remote machine and went to login to ispconfig it locked the server and i was just on a website that is on the same server just before going into ispconfig. so had to reboot the server because the whole server was physically locked. This kinda seems like a viral only because this server was built 2 months ago and ran nonstop till about 2 weeks ago now.
Did you change something under Management -> Server -> Settings (maybe added a new IP address)?
What's the value of $go_info["server"]["network_config"] in /home/admispconfig/ispconfig/lib/config.inc.php?
palkat
24th March 2006, 15:43
Falko,
No you question on if i changed anything there no but will double check.
I just saw my clamav scan results:
----------- SCAN SUMMARY -----------
Known viruses: 47129
Engine version: 0.88
Scanned directories: 17723
Scanned files: 156215
Infected files: 9
Data scanned: 12258.74 MB
Time: 6628.330 sec (110 m 28 s)
so i feel better knowning maybe part of the problem is viral. Dumb question.. based on my results i pasted how do i know what CLAMAV did to those 9 infected files, did it repair or delete them??
falko
24th March 2006, 21:13
so i feel better knowning maybe part of the problem is viral. Dumb question.. based on my results i pasted how do i know what CLAMAV did to those 9 infected files, did it repair or delete them??
I don't know. Please check the ClamAV documentation for this.
What's the value of $go_info["server"]["network_config"] in /home/admispconfig/ispconfig/lib/config.inc.php?
palkat
25th March 2006, 04:51
Falko,
here is the value in my config.inc.php:
$go_info["server"]["network_config"] = 0; // 0 = none, 1 = automatic
what does this mean or should be?
as for the clamv i ended up moving the 9 files to a temp folder using clamscan commands and once i got the 9 files in that folder i had clamscan removed them the files that were infected. For what it is worth are as follows (they have been deleted now)
server:~/infected # dir
total 186032
drwxr-xr-x 2 root root 504 Mar 24 08:48 .
drwx------ 28 root root 2416 Mar 24 07:21 ..
-rw-r--r-- 1 root root 14130 Mar 1 19:45 0aeb93aa24adec6e5e04c2928ef8b62b.eml
-rw-r--r-- 1 admispconfig admispconfig 14130 Mar 1 19:45 0aeb93aa24adec6e5e04c2928ef8b62b.eml.000
-rw------- 1 root root 44363 Mar 12 20:27 1142220453.599_0.server
-rw-r--r-- 1 admispconfig admispconfig 17369 Mar 22 12:11 480ea2d98a2bf150bebb270daa4324c5.eml
-rw-r--r-- 1 root root 14083 Mar 1 19:45 4cd59f0efaf9647560d3fc224de6bdb6.eml
-rw-r--r-- 1 admispconfig admispconfig 14083 Mar 1 19:45 4cd59f0efaf9647560d3fc224de6bdb6.eml.000
-rw------- 1 root root 190074880 Mar 17 12:35 JagTEa.tar
-rw-r--r-- 1 admispconfig admispconfig 17319 Mar 22 12:10 c181681220fc92f650a1730d530ed2d8.eml
-rw------- 1 oneillpcs.com_shane web1 80719 Mar 16 05:19 quota.oneillpcs.com_shane
server:~/infected #
After these files were removed i did another clamscan and no more infection found...maybe that will help. LOL
till
25th March 2006, 12:15
here is the value in my config.inc.php:
$go_info["server"]["network_config"] = 0; // 0 = none, 1 = automatic
what does this mean or should be?
This means that ISPConfig does not reconfigure your network card (eth0) when you add a new IP in the ISPConfig interface.
palkat
25th March 2006, 17:38
thanks Till!
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.