LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > litespeed - database connections errors

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2008, 05:53 AM
mecho mecho is offline
New Member
 
Join Date: Dec 2008
Posts: 5
Question litespeed - database connections errors

Hi ,

few days ago my datacenter support suggested me to use litespeed instead of apache and as we tried i'm happy with it . speed is great and pages loads much faster . but in one of our websites we have database connection errors !

we have few rewrite rules for these websites , first i thought those lines are the reasons and i removed them but still we get errors :

Quote:
Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/mechoddl/public_html/admin/user.php on line 18

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/u/public_html/admin/user.php on line 18

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/u/public_html/admin/user.php on line 27
Failed to connect to databases, contact
and here are the lines (18 & 27):
Quote:
$dls = mysql_fetch_array(mysql_query("SELECT * FROM downloads WHERE reports='0'"));

$view = mysql_fetch_array(mysql_query("SELECT * FROM downloads ORDER BY date DESC"));
Any help would be more than great .

thanks
Reply With Quote
  #2  
Old 12-05-2008, 10:52 AM
PSS PSS is offline
Senior Member
 
Join Date: Jun 2007
Posts: 126
My guess is that first query result does not fit to allocated PHP memory (memory_limit) and it crashes the PHP process. I don't think Litespeed has anything to do it.
Reply With Quote
  #3  
Old 12-05-2008, 02:22 PM
mecho mecho is offline
New Member
 
Join Date: Dec 2008
Posts: 5
didn't fix it. Although raising it "helped" a little or seemed to. I would say thats not the problem. and i'm sure script is fine becuase we had no problem with it before litespeed. i'm not saying that litespeed is the reason . i guess some configs are not correct which i have no idea what it can be .

any idea ?
Reply With Quote
  #4  
Old 12-07-2008, 12:40 AM
mecho mecho is offline
New Member
 
Join Date: Dec 2008
Posts: 5
Anyone ??? any suggestion ?
Reply With Quote
  #5  
Old 12-07-2008, 07:35 AM
PSS PSS is offline
Senior Member
 
Join Date: Jun 2007
Posts: 126
1. Do CHECK TABLE for all tables with phpmyadmin. If you see corrupted .MYI files repair those tables at least twice (yes!).
2. if above does not help, increase max temporary table size in my.cnf, e.g. : tmp_table_size=128M
3. check mysql error log for clues
4. Again, the result set must fit into php memory, if you do SELECT * make sure you know how much data you get.
Reply With Quote
  #6  
Old 12-07-2008, 08:30 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
If you are using cPanel, you can try 3.3.23 package, cPanel impose a memory limit of 256MB, which will be passed to PHP processes running in non-suEXEC mode, it has been fixed in 3.3.23 release. Just change the version number in the download link to get it.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:10 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.