Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
3 registered (57-Vette, Chosen, Stan), 39 Guests and 15 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 10/19/08
Posts: 52
Top Posters (30 Days)
Ruben 50
DennyP 24
Gizmo 23
Dunny 15
SteveS 13
AllenAyres 12
dbremer 10
SD 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 1 of 4 1 2 3 4 >
Topic Options
#229959 - 10/15/09 10:01 AM Max User Connections error
ChevyGuy Offline
stranger
Registered: 07/16/06
Posts: 5
Loc: Issaquah, WA
Just upgraded from 7.4.1 to 7.5.3

Now our board has slowed WAY DOWN and I'm seeing hundreds of max_user_connections error messages in the log.

I saw some earlier threads on this but they related to a custom Island. Are there any issues, or tips that I need to take into account as a result of the upgrade?

The host (Webintellects) just came back with this response:
Quote:
Error message means that you have exceeded limit on amount of connections to your database, you need to check your application and make sure that open connections are closed properly, because, unfortunately we can't increase max_user_connections value on the server, since it can cause server overload.
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#229964 - 10/15/09 10:52 AM Re: Max User Connections error [Re: ChevyGuy]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Hmm, not real sure what we be causing that. The upgrade from 7.4.1 really didn't add much in the way of new heavy features at all.

Can you post some info like what the max_user_connections is and how many users you have online when you get the error?
Top
#229994 - 10/15/09 03:26 PM Re: Max User Connections error [Re: Rick]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
Wow.. I've been getting emails (hate mail :-) since this morning... ouch.

At 9 am today it behaved good for a while. (Suspect they reset the server after my trouble ticket posting to them.)

Then within an hour later with only 5 or 6 uses showing got this from my database guy:

I'm getting errors now when I try to access the DBs:

*Warning*: mysql_connect() [function.mysql-connect <http://vcca.org/members/admin/members/function.mysql-connect>]: Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug in *E:\inetpub\vhosts\vcca.org\httpdocs\members\Connections\mx_shop.php* on line *9*

*Fatal error*: Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug in *E:\inetpub\vhosts\vcca.org\httpdocs\members\Connections\mx_shop.php* on line *9
*
_________________________
--BIll B
Top
#229995 - 10/15/09 03:29 PM Re: Max User Connections error [Re: Bill B]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
I can't even log in right now...

UBB Message
We encountered a problem. The reason reported was
Database error only visible to forum administrators

Please click back to return to the previous page.
_________________________
--BIll B
Top
#229996 - 10/15/09 03:35 PM Re: Max User Connections error [Re: Bill B]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Can't even view the site url right now
Quote:
We encountered a problem. The reason reported was

Database error only visible to forum administrators

Please click back to return to the previous page.

That error should be viewable from the control panel.
Or ftp to your error logs folder
_________________________
Blue Man Group
Top
#229998 - 10/15/09 03:50 PM Re: Max User Connections error [Re: Bill B]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
If you never enabled logs in the ubb control panel.
There is another way to view the errors to get something other than the generic message.
Here
_________________________
Blue Man Group
Top
#230001 - 10/15/09 04:19 PM Re: Max User Connections error [Re: Ruben]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
Thanks... I'll need to FTP in since I can't log in to the Control Panel...

Yes, I know about the generic message flag, but have forgotten about it. Maybe it WOULD be helpful to let the users see the "real" message.
_________________________
--BIll B
Top
#230002 - 10/15/09 04:20 PM Re: Max User Connections error [Re: Bill B]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
ah... just realized why I never enacted this before.

Quote:
You'll want to change this back when you're finished however, as it could identify db names and other data your users don't really need...
_________________________
--BIll B
Top
#230003 - 10/15/09 04:28 PM Re: Max User Connections error [Re: Bill B]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Yep, You don't want to edit the file and leave it on.
But in a pinch it may be the only way to find the real error.
_________________________
Blue Man Group
Top
#230006 - 10/15/09 07:27 PM Re: Max User Connections error [Re: Bill B]
Gizmo Offline

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
Originally Posted By: Bill B
Maybe it WOULD be helpful to let the users see the "real" message.
Not really, if the error contained say a 3rd party location sql server if you where being DoSed; or say if a password would potentially be dumped to the browser...
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#230007 - 10/15/09 07:58 PM Re: Max User Connections error [Re: Gizmo]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
Yep... got it... as luck has it, I was just able to log in and use the CP.

Here is what I'm seeing:

Beginning at 09:28 this morning this is the error message that filled my log file:
Script: - Line: Unable to connect to the database! - Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug

Then from 11:46 to 13:13 it was this:
Script: - Line: Unable to connect to the database! - User vccachat already has more than 'max_user_connections' active connections

Then from 13:14 to 13:43 it went back to this:
Script: - Line: Unable to connect to the database! - Can't create a new thread (errno 12); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug

Then from 13:55 to 14:18
Script: - Line: Unable to connect to the database! - Lost connection to MySQL server at 'reading initial communication packet', system error: 0
=====================
Does this look like it could be caused by increaed users on the forum??? That's what the HOST is telling me... and of course, they want me to upgrade to a VPS for more $$$ per month.
_________________________
--BIll B
Top
#230062 - 10/16/09 09:59 AM Re: Max User Connections error [Re: Bill B]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Well, if you've seen a substantial increase in users, then potentially that could be the problem. Not from just a couple more users however. And the upgrade from 7.4 to 7.5 definitely doesn't add any more database connections.

Are you running the forum stats box on your site, and if so has your max online record been set recently?
Top
#230144 - 10/19/09 01:49 PM Re: Max User Connections error [Re: Rick]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
errno 12 comes from a couple of things.

Primarily, there is a bug in earlier versions of MySQL 5.1 and some 5.0.x versions. http://bugs.mysql.com/bug.php?id=20815 You might want to upgrade your MySQL version. 5.0.x versions previous to 5.0.48 also exhibit this behavior.

The next possibility is that you've reached the limit of a 32 bit OS and can't allocate more memory but that would take millions of posts, not thousands.
_________________________
This thread for sale. Click here!
Top
#230176 - 10/19/09 11:50 PM Re: Max User Connections error [Re: David Dreezer]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
Thanks. Every little bit helps.

1) No our Max Online hasn't changed since 03/31/08.
2) We finally got back on line by turning OFF the FastCGI function.
3) An SA at the hosting company finally admitted that he upped the PageFile setting.

Currently set at:
max_user_connections set to 100
max_connections=300 set to 300

After four days of relative calm, some users still experience some slowdowns and error messages, but most are doing okay.

I'm thinking about moving to a VPS. Does anyone have experience with hosting UBB and the MySQL db on the same server??
_________________________
--BIll B
Top
#230181 - 10/20/09 01:18 PM Re: Max User Connections error [Re: Bill B]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
"I'm thinking about moving to a VPS. Does anyone have experience with hosting UBB and the MySQL db on the same server??"

This one is. As is UBBDev. They are not vps though.

Did you check on the MySQL server version number?
_________________________
This thread for sale. Click here!
Top
#230198 - 10/20/09 10:30 PM Re: Max User Connections error [Re: David Dreezer]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
PHP Version 5.2.6

We had another 20 minute SLOW DOWN today... I got dozens of emails from people letting me know. I just sent the entire log file to the host... but they don't seem to know what to do.

I'm now looking at webintellects.com VPS with Linux.

But I'm wondering if having UBB and MySQL on the same server is a good idea or not.
_________________________
--BIll B
Top
#230200 - 10/21/09 12:20 AM Re: Max User Connections error [Re: Bill B]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
Bill, I'm not trying to give you a hard time, but 3 times you've seemed to miss the one thing above all that causes this error. http://bugs.mysql.com/bug.php?id=20815

Have you checked your MySQL server version yet against the versions known to have the bug that most commonly gives the errno 12 error? You answered with PHP version but is not MySQL server version.

Please check that as it is the most likely cause.
_________________________
This thread for sale. Click here!
Top
#230220 - 10/21/09 03:01 PM Re: Max User Connections error [Re: David Dreezer]
Gizmo Offline

Registered: 06/05/06
Posts: 14995
Loc: Portland, OR; USA
And regarding MySQL and the webserver on the same host; that's actually how most environments are...
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#230228 - 10/22/09 12:10 AM Re: Max User Connections error [Re: David Dreezer]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
David, I love you man. Give me a hard time. ?!?!

Sorry, I was too distracted to stay focused. Tonight for the first time in 3 years, my host has finally sent me the list of the server settings.

Here's what I just pulled for the MySQL info:
MySQL client version: 5.0.22
and
Server version: 5.0.45-community-nt


Here is a copy of the current mysql configuration:

[MySQLD]
port=3306
basedir=E:\\Databases\\MySQL
datadir=E:\\Databases\\MySQL\\Data
default-character-set=latin1
default-storage-engine=INNODB
read_buffer_size=1M
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_additional_mem_pool_size=2M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1M
innodb_buffer_pool_size=16M
innodb_log_file_size=10M
innodb_thread_concurrency=8
max_connections=400
old_passwords=1
max_user_connections=100
thread_cache_size=4
thread_stack=196608
binlog_cache_size=32768
net_read_timeout=300
net_retry_count=10
net_write_timeout=300
thread_concurrency=10
wait_timeout=400
interactive_timeout=400
open_files_limit=0
[client]
_________________________
--BIll B
Top
#230229 - 10/22/09 03:07 AM Re: Max User Connections error [Re: Bill B]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
5.0.45. In other words, 3 sub versions before the bug was fixed at 5.0.48. Your server version has the bug known to cause issue that you have. Encourage them to upgrade to something newer. Give them the link to to that bug if they need to understand why they need to upgrade.
_________________________
This thread for sale. Click here!
Top
#230419 - 10/29/09 03:44 PM Re: Max User Connections error [Re: Gizmo]
ChevyGuy Offline
stranger
Registered: 07/16/06
Posts: 5
Loc: Issaquah, WA
Two weeks have gone by and we still get max_connections and timeout errors. Only have 20 or 25 users at any one time. The host increased connections and file size (for cache). And reduced timeout settings.

Yesterday they restarted IIS to get up back.. but 20 minutes later we were bogged down again.

Are you sure that there isn't any issue with 7.5.4 not closing out processes? Sorry, I had to ask.
Top
#230420 - 10/29/09 04:00 PM Re: Max User Connections error [Re: ChevyGuy]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Just a thought.
Did you happen to enable
"Use Persistent Connections"
in the ubb control panel?
_________________________
Blue Man Group
Top
#230421 - 10/29/09 04:00 PM Re: Max User Connections error [Re: ChevyGuy]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
There are only 2 ways a connection won't get closed.

A. If you have persistent connections turned on (even then it will only have 1 connection per apache process)

B. If there is some other deeper issue going on with php or mysql.

When a PHP script finishes, everything closes along with it. There is nothing you actually need to do to actually close the connection.

What you probably should do is once it's been running for awhile, go into your control panel and then run the following SQL command:

Sql Query:
show processlist


That will show you any processes (connections) that are currently open. That should give you an idea if there are lingering connections hanging around.

You should definitely run that query when you're getting the max_connections error and let us know what you find.
Top
#230423 - 10/29/09 05:05 PM Re: Max User Connections error [Re: Rick]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Well I am not sure how IIS deals with persistent connections.
Since the only value in IIS I can reference is concurrent connections.
_________________________
Blue Man Group
Top
#230434 - 10/29/09 08:47 PM Re: Max User Connections error [Re: Ruben]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
Ruben -- thanks. I did NOT have persistent_connections turned on. So I just did that.. We'll watch to see what happens.

Rick -- Thanks too. I'll try out the "show processlist" query.
_________________________
--BIll B
Top
#230453 - 10/30/09 01:03 PM Re: Max User Connections error [Re: Bill B]
Ruben Offline

Registered: 12/20/03
Posts: 4424
Loc: Lutz,FL
Originally Posted By: Bill B
Ruben -- thanks. I did NOT have persistent_connections turned on. So I just did that.. We'll watch to see what happens.

Rick -- Thanks too. I'll try out the "show processlist" query.

Well I meant it could be causing the problem! Oh Well.
_________________________
Blue Man Group
Top
#230474 - 10/30/09 03:00 PM Re: Max User Connections error [Re: Ruben]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
Performance has been better since I turned on "persistent connections"... but I noticed about 25 error messages from an hour ago when the MySQL calls failed due to "maximum_connections" error.

I just went in and saw these three processes running. The first one looks odd to me -- with the comment about copying to a "temp table". Is that unusual? What do you think?

- - - - -SQL LOG - - - - - - - - - - - - - - -
35266 vccachat localhost:4598 vccachat_org_-_chat Query 39 Copying to tmp table SELECT p.POST_ID FROM ubbt_POSTS p LEFT JOIN ubbt_POSTS pp on p.POST_ID=pp.POST_ID, ubbt_TOP

35289 vccachat localhost:4636 vccachat_org_-_chat Query 0 show processlist

35291 vccachat localhost:4638 vccachat_org_-_chat Query 0 Sending data select t1.TOPIC_ID,t1.POST_ID,t2.USER_DISPLAY_NAME,t1.TOPIC_CREATED_TIME,t1.TOPIC_LAST_REPLY_TIME,t
------------------------------------------------------------
_________________________
--BIll B
Top
#230475 - 10/30/09 03:15 PM Re: Max User Connections error [Re: Bill B]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
That' query is coming from your search. If the result set is larger than your mysql configuration allows then it will have to create a temp table for sorting. I'd check what your maximum search results and search range is set to in the control panel.
Top
#230476 - 10/30/09 03:20 PM Re: Max User Connections error [Re: Bill B]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
Okay, I'm starting to see something here.

There are only 4 or 5 people logged into my forum right now.
I saw the three processes as noted in the previous posting. Then 3 or 4 minutes later I went back in --- and there were 30 processes running. See Picture1 , Picture2 and Picture3 .

As soon as I copied them to a file (approx 1 mintue later) I looked and only had the processes in Picture4 running.
_________________________
--BIll B
Top
#230477 - 10/30/09 03:37 PM Re: Max User Connections error [Re: Bill B]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
I had Search set to 6 years, 3 characters, 100 results.
I changed it to 5 years, 3 characters, 50 results.

My database is:

Totals=
ROWS: 380591, DATA: 153.1 MB, INDEXES: 68.55 MB
_________________________
--BIll B
Top
#230479 - 10/30/09 04:08 PM Re: Max User Connections error [Re: Bill B]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Ok, so what it looks like is connections waiting on your searches to finish, so they pile up behind that. You really don't have that much data, so it shouldn't be taking that long to search.

The odd thing is the search has been this way since 7.0, but you said you're just starting to see issues recently.

You might have answered this before, but are you on a shared server, virtual private, dedicated? You could probably see some improvements on this if MySQL was tuned properly.

I'd also suggest turning off searches for guest users if it isn't already. We will be making some major changes to the search for 8.0 to help, but from those screenshots, your searches are taking well over 10 minutes to complete, which isn't normal at all for the amount of data that you have.
Top
#230489 - 10/30/09 05:45 PM Re: Max User Connections error [Re: Rick]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
We are on a shared server. But I am beginning the move to a virtual private this weekend. Will move the web pages now and save the db until next week.

I'll see where searches for guests is located.. but I don't think that applies to me. ALL of our users are required to register.
_________________________
--BIll B
Top
#230519 - 10/30/09 10:59 PM Re: Max User Connections error [Re: Bill B]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
Shared server means the MySQL server can't be tuned for you, normally. VPS means it probably can be. You going Linux or Windows, Bill?
_________________________
This thread for sale. Click here!
Top
#230521 - 10/31/09 12:46 AM Re: Max User Connections error [Re: David Dreezer]
Bill B Offline

member
Registered: 10/29/06
Posts: 189
Loc: Issaquah, WA
I'm moving FROM Windows to a Linux VPS. Decided to make as many changes as I can to get better performance.

As of a couple of minutes ago, all of my web pages and 5 MySQL databases are moved and running good in the new location.

I have two "virtual" links that I need to fix.

Then, if I don't find any other problems, I might try to get a copy of the Threads database moved over to the new location tomorrow. That will be the Big Test.
_________________________
--BIll B
Top
#230528 - 10/31/09 12:31 PM Re: Max User Connections error [Re: Bill B]
David Dreezer Offline

Pooh-Bah
Registered: 07/21/06
Posts: 2199
Oh good, then we can do some tuning on MySQL and get it to sing smile
_________________________
This thread for sale. Click here!
Top
#232053 - 12/12/09 02:16 AM Re: Max User Connections error [Re: Gizmo]
Cool Dude Offline
stranger
Registered: 12/12/09
Posts: 3
Everything is fine for me here. Please check your configurations guys wink
Top
#232078 - 12/12/09 01:13 PM Re: Max User Connections error [Re: Cool Dude]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: SoCal, USA
Just watch out for the CASE sensitive differences between Doze and Nix regards DB table names..

that is a bugga boo at times..

Rick should really go all lower case for v8.0 and this will go away as an issue..
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
Page 1 of 4 1 2 3 4 >



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image