php/mysql errors??

Discussion in 'General' started by palkat, Mar 16, 2006.

  1. palkat

    palkat New Member

    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!
     
    Last edited: Mar 16, 2006
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  3. palkat

    palkat New Member

    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.
     
    Last edited: Mar 16, 2006
  4. falko

    falko Super Moderator ISPConfig Developer

    Normally these errors occur if you run out of memory. So maybe you should have a look at your memory usage with
    Code:
    top
     
  5. palkat

    palkat New Member

    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...
     
  6. falko

    falko Super Moderator ISPConfig Developer

    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.
     
  7. palkat

    palkat New Member

    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.
     
  8. palkat

    palkat New Member

    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
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Maybe you should check your cron jobs. Maybe there's one that runs every 3 or 4 days and causes these problems...
     
  10. palkat

    palkat New Member

    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.
     
    Last edited: Mar 22, 2006
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    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?
     
  12. palkat

    palkat New Member

    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*
     
  13. falko

    falko Super Moderator ISPConfig Developer

    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 ).
     
  14. palkat

    palkat New Member

    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!
     
  15. falko

    falko Super Moderator ISPConfig Developer

  16. palkat

    palkat New Member

    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?
     
    Last edited: Mar 23, 2006
  17. falko

    falko Super Moderator ISPConfig Developer

    Have a look at ClamAV: www.clamav.net
     
  18. palkat

    palkat New Member

    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.
     
    Last edited: Mar 24, 2006
  19. falko

    falko Super Moderator ISPConfig Developer

    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?
     
  20. palkat

    palkat New Member

    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??
     

Share This Page