Previous Thread
Next Thread
Print Thread
Hop To
#212021 05/13/2008 11:04 AM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

I'm having major problems since yesterday. Users and myself are getting "Couldn't connect." errors -- I'm getting them constantly submitting anything in the control panel -- I can't do anything!

Check out these gems:

Quote
UBB Message
We encountered a problem. The reason reported was

Script:
Line#:
SQL Error: User gbb_admin has already more than 'max_user_connections' active connections
SQL Error #: 1203
Query: Unable to connect to the database!

Please click back to return to the previous page.
Quote
UBB Message
We encountered a problem. The reason reported was

Script: /home/gbb/public_html/threads/libs/user.inc.php
Line#: 434
SQL Error: Table 't1' is marked as crashed and should be repaired
SQL Error #: 1194
Query: SELECT t2.USER_TIME_OFFSET,t2.USER_TOPIC_VIEW_TYPE,t2.USER_TIME_FORMAT, t1.USER_ID, t1.USER_DISPLAY_NAME, t1.USER_PASSWORD, t1.USER_SESSION_ID, t1.USER_MEMBERSHIP_LEVEL, t1.USER_IS_BANNED,t1.USER_RULES_ACCEPTED, t1.USER_IS_UNDERAGE, t2.USER_TOTAL_PM, t2.USER_STYLE, t2.USER_HIDE_LEFT_COLUMN,t2.USER_HIDE_RIGHT_COLUMN, t2.USER_LANGUAGE, t2.USER_MOOD, t2.USER_RELATIVE_TIME, t2.USER_TIME_OFFSET,t2.USER_SHOW_ALL_GRAEMLINS, t2.USER_AVATAR, t2.USER_TITLE, t2.USER_CUSTOM_TITLE, t2.USER_NAME_COLOR, t2.USER_SHOW_LEFT_MYSTUFF FROM ubbt_USERS as t1, ubbt_USER_PROFILE as t2 WHERE t1.USER_ID = 2 AND t1.USER_ID = t2.USER_ID

Please click back to return to the previous page.
Quote
UBB Message
We encountered a problem. The reason reported was

Script: /home/gbb/public_html/threads/scripts/activetopics.inc.php
Line#: 139
SQL Error: Got error 127 from storage engine
SQL Error #: 1030
Query: select count(t1.TOPIC_ID) from ubbt_TOPICS as t1, ubbt_FORUMS as t2 where t1.TOPIC_LAST_REPLY_TIME > 1210084688 and t1.FORUM_ID in (16,1,9,12,13,2,3,6,7,10,11,8,14,17,18,5,4,15) and t1.FORUM_ID = t2.FORUM_ID and t2.FORUM_ACTIVE_POSTS = 1 and t1.TOPIC_IS_APPROVED = 1 and t1.TOPIC_STATUS <> 'M'

Please click back to return to the previous page.


Host "repaired" the database to no avail. The board otherwise works, but these *&^$%#@#^%*&^ random (on the main site, and constant in admin) "Couldn't connect" errors upon submitting forms is killing me!! mad

What could be the problem?

Last edited by jgeoff; 05/13/2008 2:21 PM.

GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #212023 05/13/2008 11:30 AM
Joined: Jun 2006
Posts: 3,837
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,837
Essentially you have too many people trying to connect to your database than MySQL allows.

Sadly I am not an expert on this, so will have to bow down to someone else.

I have been trying to find a good setting for my server, which is a 4GB Quad CPU machine, but to date have not found anyone to assist (the only site that seems to have anyone is a VB site and I would rather not use their service LOL)

Ian #212025 05/13/2008 11:46 AM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

6 Registered (4 invisible), 2 Guests and 18 Spiders online. :/

Making a post sometimes gives me "Cannot Connect" but the post goes through anyway -- but in control panel, I cannot successfully submit ANY form that contains data -- can't even clear cache! frown


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #212026 05/13/2008 1:00 PM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

Another symptom? My Who's Online island hasn't updated in forever, despite the main WOL page, and the other islands, working fine. I can't clear my cache w/o connect errors.

I'm getting really pissed off right now. mad


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #212031 05/13/2008 1:45 PM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

From my host:
Quote
I was doing some testing on your site and also searching some forums, it seems you are hitting your max connections. There has to be something in your script that is not closing the connections after they are initiated or it might be the 'shout box' killing all your resources. I would reccomend taking down the shout box and seeing if you still get the "Couldn't connect" issue.


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #212032 05/13/2008 2:06 PM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

It wasn't the Shout Box. Guess I'll open up a ticket to rule out threads...

Edit: Crap, no credits. frown

Last edited by jgeoff; 05/13/2008 2:08 PM.

GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #212034 05/13/2008 2:21 PM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
are you using persistent connections? turn that off, if you were/are.

[Linked Image from sirdude.com]

SD #212036 05/13/2008 2:25 PM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

No, I've never enabled that...


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #212045 05/13/2008 3:25 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Well, since it's a max_user_connection limit, then you should be able to take a gander at every running connection and see what it's doing and if they are closing or not.

Best bet would be to do it through your host's control panel, like phpmyadmin.

Run the following SQL command and see what you get:

show processlist

Rick #212046 05/13/2008 3:29 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Also, it might be interesting to hear what they have for your max_user_connection limit.

Rick #212048 05/13/2008 3:32 PM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

This is all I get, Rick...
Attachments
show_processlist.gif


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #212049 05/13/2008 3:34 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Ok, refresh that from time to time. That looks good. It means at the time you ran that, there was only 1 active connection to the database.

Keep refreshing it, especially if the error pops up quite a bit, when it does pop, if it truly is a connection number problem, then you should see a long list of connections.

Rick #212051 05/13/2008 3:54 PM
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
SHOW VARIABLES <-- run that sql and it will show the variables

there are 2 fields

max_user_connections (usually 0 -- unlimited) and
max_connections (default 100)

Linky Poo™

for more info smile

SD #212052 05/13/2008 3:55 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
ah yeah, forgot about that wink

Yeah, run that and then look for the max_user_connections to see what they have it set to.

Rick #212072 05/13/2008 8:12 PM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1
Code
max_user_connections  	 25
max_connections  	500
25 seems kinda small?!

As for show processlist, I keep getting just the one line


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #212073 05/13/2008 8:20 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
25 is pretty small, especially if there is any sort of delay in any of the queries running. If any happen to need to do some sort of table lock while the mysql server is a bit slow then anyone else on the forums at that point will get queued up.

So, 25 connections could conceivably be taken up in very short order. Normally, even on this site, I'll only see 1-3 active connections. But there are times it can spike up for sure.

That being said, the error you are getting normally seems a bit odd. "Couldn't connect" is pretty generic, definitely not coming from UBB.threads, and the fact that I can get this error on your site when show processlist is showing only 1 active mysql connection is pretty suspicious.

Rick #212076 05/13/2008 10:31 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
For anyone following along, this isn't threads related. It's a custom island issue with trying to connect to a database that apparently doesn't have permission wink

Rick #212077 05/13/2008 10:36 PM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

It is? I know Who's Online stopped working... OH! So did the TV Listings... hmm... You're right! That's where the error message is coming from. I'll have to look into why it just stopped working all of a sudden. I know they moved the server it was hosted on - maybe it has something to do with that. I'll disable it and see if everything else starts working again...


Last edited by jgeoff; 05/13/2008 10:39 PM.

GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #212078 05/13/2008 10:38 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Check your PM, you posted right after I posted to you wink

Rick #212079 05/13/2008 10:54 PM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

A public thank you for tracking that down!!

Rick Rawks! cool


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #212225 05/14/2008 5:55 PM
Joined: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

Whew! After another whole day working with my web host wondering why mysql_connect wasn't working, Level 2 support figured it out pretty quickly: apparently there was some unrelated IP address that needed to be added to the Access Hosts list. Bizarre, because it appears to be a dedicated IP for some unrelated web site on the server.

Thanks again, Rick, for tracking down the source of this non-Threads problem!


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
jgeoff #213575 05/28/2008 10:25 AM
Joined: Jun 2006
Posts: 171
Likes: 1
member
member
Joined: Jun 2006
Posts: 171
Likes: 1
Um, I am having the same problem!

And I'm really tired--with a head-ache to boot--HOW DO YOU FIX IT?!

~Sue <<-- in need of sleep after working all night

ADWOFF #213576 05/28/2008 10:27 AM
Joined: Jun 2006
Posts: 171
Likes: 1
member
member
Joined: Jun 2006
Posts: 171
Likes: 1
This is the message I get:

Quote
We encountered a problem. The reason reported was
Script:
Line#:
SQL Error: Too many connections
SQL Error #: 1040
Query: Unable to connect to the database!

Please click back to return to the previous page.

I don't even think I can get into the control panel.

And if this is something MySql related, I'm really screwed because that stuff is Greek to me. frown

~Sue <<-- just wants to read her board

ADWOFF #213586 05/28/2008 11:23 AM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
This is basically stating that you've reached the max connections allowed to MySQL. Are you on a shared server or is this your own server? If it's your own/dedicated server then it's just a matter of bumping up max_connections if the server has the resources.

If you're on a shared host, then it's a bit tricky. The error message is the global one, meaning that they have a set amount of connections for all domains on the machine, and it's being reached, and they might not bump it.

Rick #213629 05/29/2008 6:13 AM
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
It's her own server; I bumped it up to something insanely high that she should never reach and restarted MySQL... Luckily she caught me yesterday morning before i went to bed...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
3 members (rootman, Gizmo, Nightcrawler), 562 guests, and 186 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)