PDA

View Full Version : Apache max clients


peegee
Wed 5th Dec '07, 2:44am
Hi, im having some issues with my dedicated server..

My apache is set to 256 clients in version 1.3.

I keep receiving emails from the server telling me mysql failed because Max connections where reached.

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: User ****** has already more than 'max_user_connections' active connections
/home/puregraf/public_html/graffiti-space/includes/class_core.php on line 274

I am wondering if someone can help me out, i want to recompile apache (my support will do this) but i dont know if this will cause problems on the server, such as high server load... Im not sure how much my server can handle.

this is my servers specs:

Server Information

Processor Information Processor #1 Vendor: GenuineIntel
Processor #1 Name: Intel(R) Xeon(R) CPU L5320 @ 1.86GHz
Processor #1 speed: 1867.615 MHz
Processor #1 cache size: 4096 KB

Processor #2 Vendor: GenuineIntel
Processor #2 Name: Intel(R) Xeon(R) CPU L5320 @ 1.86GHz
Processor #2 speed: 1867.615 MHz
Processor #2 cache size: 4096 KB

Processor #3 Vendor: GenuineIntel
Processor #3 Name: Intel(R) Xeon(R) CPU L5320 @ 1.86GHz
Processor #3 speed: 1867.615 MHz
Processor #3 cache size: 4096 KB

Processor #4 Vendor: GenuineIntel
Processor #4 Name: Intel(R) Xeon(R) CPU L5320 @ 1.86GHz
Processor #4 speed: 1867.615 MHz
Processor #4 cache size: 4096 KB

Memory Information Memory: 2072760k/2096512k available (1883k kernel code, 22740k reserved, 761k data, 188k init, 1179008k highmem)

System Information Linux server126.server-center.net 2.6.9-55.0.2.ELsmp #1 SMP Tue Jun 12 17:59:08 EDT 2007 i686 i686 i386 GNU/Linux

Physical Disks hda: DV-28E-R, ATAPI CD/DVD-ROM drive
hda: ATAPI 24X DVD-ROM drive, 256kB Cache, UDMA(33)
SCSI device sdb: 490234752 512-byte hdwr sectors (251000 MB)
SCSI device sdb: drive cache: write back
SCSI device sdb: 490234752 512-byte hdwr sectors (251000 MB)
SCSI device sdb: drive cache: write back

Current Memory Usage total used free shared buffers cached
Mem: 2074324 2005400 68924 0 117560 1182764
-/+ buffers/cache: 705076 1369248
Swap: 2096440 240360 1856080
Total: 4170764 2245760 1925004

Current Disk Usage Filesystem Size Used Avail Use% Mounted on
/dev/sdb5 9.9G 3.5G 5.9G 37% /
/dev/sdb1 99M 21M 74M 22% /boot
none 1013M 0 1013M 0% /dev/shm
/dev/sdb7 198G 83G 105G 45% /home
/dev/sdb8 1012M 36M 925M 4% /tmp
/dev/sdb3 9.9G 4.5G 4.9G 48% /usr
/dev/sdb2 9.9G 4.4G 5.0G 47% /var
/tmp 1012M 36M 925M 4% /var/tmp
by the way i pay 270 a month for this server, is it worth it? i have been struggling with being able to get a good dedicated server for my site for years, i would really appreciate it if someone who understands all this can help me out, i just switched to this server a few months ago and now its giving me these problems, im so frustrated i thought i had made the right decision and choice for server but yea i know nothing about servers

on my site i run: vbulletin, photopost.com (photo site), phpmotion.com (videos), and a links database also php.


thank you

Steve Machol
Wed 5th Dec '07, 12:22pm
This is a server issue. The server has maxed out the number of MySQL connections your server allows you to have. You will need to increase the 'max_user_connections' setting in my.cnf to fix this.

Here is more info on this error:

http://dev.mysql.com/doc/refman/4.1/en/user-resources.html
http://dev.mysql.com/doc/refman/5.0/en/user-resources.html

peegee
Wed 5th Dec '07, 2:29pm
Steve thanks, but i am aware of the problem. My concern is if i do raise the apache client higher, how much higher should i raise it to, and based on my server information, would this cause problems if i do raise the clients?


Thank You

Steve Machol
Wed 5th Dec '07, 2:30pm
That error has nothing to do with Apache maxclients. I really don't have any suggestions regarding that setting. Sorry.

peegee
Wed 5th Dec '07, 2:36pm
How would i find out how many 'max_user_connections' my server currently has?

thanks

Steve Machol
Wed 5th Dec '07, 2:37pm
As per my post this is in your my.cnf file. If it's not in their then you are using the default setting, and I do not know what the default is.

peegee
Wed 5th Dec '07, 5:49pm
Thanks steve,

my info is Mysql version on the server is "4.1.22-standard" and the "max_user_connections" is 25


in your opinion, what should i raise this to that would be a safe number based on my server information?

and should i upgrade mysql in your opinion?

Thanks

Steve Machol
Wed 5th Dec '07, 6:00pm
I would set this to about 100 above the highest users online total you have to date.

Your version of MySQL is fine. Upgrading it is optional and not mandatory.

eva2000
Thu 6th Dec '07, 7:05pm
max_user_connections is a mysql related setting has nothing to do with apache's maxclients setting

if you have your own dedicated server just remove max_user_connection setting from mysql my.cnf as it's not needed - only intended for shared hosting environments to limit virtual hosts for fairer resource usage.