cougkid Posted October 6, 2008 Share Posted October 6, 2008 I keep receiving max_user_connections error Persistent connections are turned off max users has been set to unlimited I get about 300K page views per day. I don't have a dedicated server, but I do have a shared server all to myself with a dual-core processor. I have been working with my host for a few weeks to troubleshoot this, and I feel like we are overlooking something. Is this a server issue, or could it be caused by a poorly written query somewhere? What about the daily cron I send to about 35K people every day (it queries new content and sends an update to subscribers)? Would that cause this? This is my first post, sorry if this isn't the best category. Great forum, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/127239-max_user_connections-error-need-troubleshooting-help/ Share on other sites More sharing options...
genericnumber1 Posted October 6, 2008 Share Posted October 6, 2008 Are you using server-side caching and are you attempting to use client-side caching to the best of your ability? It makes a huge difference. Quote Link to comment https://forums.phpfreaks.com/topic/127239-max_user_connections-error-need-troubleshooting-help/#findComment-658145 Share on other sites More sharing options...
cougkid Posted October 6, 2008 Author Share Posted October 6, 2008 Are you using server-side caching and are you attempting to use client-side caching to the best of your ability? It makes a huge difference. Yes, I am using server-side caching. Quote Link to comment https://forums.phpfreaks.com/topic/127239-max_user_connections-error-need-troubleshooting-help/#findComment-658172 Share on other sites More sharing options...
genericnumber1 Posted October 6, 2008 Share Posted October 6, 2008 Yes, I am using server-side caching. Does it utilize flat files or does it also use a database? If a database, I'd suggest switching to files if you're having mysql connection limit problems. If files, is the database still being queried much? For how long do you keep the cache files, you might consider increasing the time. Try to use some type of client-side caching as it's really easy on your web server. Quote Link to comment https://forums.phpfreaks.com/topic/127239-max_user_connections-error-need-troubleshooting-help/#findComment-658177 Share on other sites More sharing options...
keeB Posted October 6, 2008 Share Posted October 6, 2008 This is a Database help question. What about the daily cron I send to about 35K people every day (it queries new content and sends an update to subscribers)? Would that cause this? The problem probably lies here. Your script is probably not closing it's connection when the query is complete. Quote Link to comment https://forums.phpfreaks.com/topic/127239-max_user_connections-error-need-troubleshooting-help/#findComment-658296 Share on other sites More sharing options...
aschk Posted October 8, 2008 Share Posted October 8, 2008 I'm not 100% convinced it has to do with closing the connection. When PHP terminates the script it's running it "should" close all mysql connections that are NOT persistent. And as the OP clearly stated mysql persistence is turned off. Nevertheless can a moderator please move this to the DB section of the forum. Quote Link to comment https://forums.phpfreaks.com/topic/127239-max_user_connections-error-need-troubleshooting-help/#findComment-659775 Share on other sites More sharing options...
waynew Posted October 8, 2008 Share Posted October 8, 2008 I have read before that mysql_close() is not needed. And that if you dont use it the connection lies in wait so to speak, waiting to be re-used. Quote Link to comment https://forums.phpfreaks.com/topic/127239-max_user_connections-error-need-troubleshooting-help/#findComment-659861 Share on other sites More sharing options...
keeB Posted October 8, 2008 Share Posted October 8, 2008 What you're talking about is a mysql_pconnect(), mysql_pclose() -- persistent connections. Quote Link to comment https://forums.phpfreaks.com/topic/127239-max_user_connections-error-need-troubleshooting-help/#findComment-659883 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.