Hi All,
We have a server with: 3G MHz Xeon, 2G RAM.
When user connection up to large than 150, there was a Database connection error.
If someone want to repeat this error. Please use JMeter to simulate 300 users access moodle, these uses browse the course and search a course, and then use firefox open moodle and the same time, this error can recurred.
Thanks for any help.
Tang
Got db connection error when user connection up to 150
Number of replies: 4Re: Got db connection error when user connection up to 150
> When user connection up to large than 150, there was a Database connection error.
Do you mean, you have over 150 users logged in the last 5 Min. as displayed in the column "Users online"?
If even a part of them are taking a quiz for example, that can cause a huge number of database connections which the server may refuse.
Give more information about software: Operating system, version, the stack webserver, database server, PHP versions, packages you used. Moodle version, how did you install. Any tuning you have done.
> these uses browse the course and search a course, and then use firefox open moodle and the same time, this error can recurred.
I don't see anything about quizes. In that case the performance is low. The question is why.
Where is FireFox opened? Do you run a GUI (MS Windows, X Window, etc.) on your server, by any chance?
Do you mean, you have over 150 users logged in the last 5 Min. as displayed in the column "Users online"?
If even a part of them are taking a quiz for example, that can cause a huge number of database connections which the server may refuse.
Give more information about software: Operating system, version, the stack webserver, database server, PHP versions, packages you used. Moodle version, how did you install. Any tuning you have done.
> these uses browse the course and search a course, and then use firefox open moodle and the same time, this error can recurred.
I don't see anything about quizes. In that case the performance is low. The question is why.
Where is FireFox opened? Do you run a GUI (MS Windows, X Window, etc.) on your server, by any chance?
Re: Got db connection error when user connection up to 150
Thanks for your reply.
Yes, there were more than 150 users logged in the last 5 Min.
The OS is Windows 2003 / PHP is 5.2.0 / PostgreSQL is 8.1.3 / Moodle 1.6.3
We don't tuning anything.
I'm not running Quiz, just login and open a course main page.
Tang
Yes, there were more than 150 users logged in the last 5 Min.
The OS is Windows 2003 / PHP is 5.2.0 / PostgreSQL is 8.1.3 / Moodle 1.6.3
We don't tuning anything.
I'm not running Quiz, just login and open a course main page.
Tang
Re: Got db connection error when user connection up to 150
Now the question is, whether 150 users logged in (withoug quiz or chat) in a period of 5 Min. is asking too much from such a machine, or do you have some error somewhere.
RAM is the most critical factor. For example, taking 30 MB as a rough guess for Moodle 1.6, if 150 processes are running at the same time, you need 4.5 GB! Which is most probably a too conservative estimation.
To measure CPU power, the current practice is to run the script discussed here http://moodle.org/mod/forum/discuss.php?d=57028
BE Warned: It writes things in your database. If Murphy is not your friend, be prepared that it may break your server!
RAM is the most critical factor. For example, taking 30 MB as a rough guess for Moodle 1.6, if 150 processes are running at the same time, you need 4.5 GB! Which is most probably a too conservative estimation.
To measure CPU power, the current practice is to run the script discussed here http://moodle.org/mod/forum/discuss.php?d=57028
BE Warned: It writes things in your database. If Murphy is not your friend, be prepared that it may break your server!
Re: Got db connection error when user connection up to 150
Hi Tang
As Visvanath points out memory usage for those total of 150 users is critical. On our Windows server, each apache thread uses 100K (as shown in task manager), so look carefully at the total RAM that is available. One thought about the db connection error: what is the value of MAX_CONNECTIONS in your postgresql.conf file? I'm thinking that this could be the limiting factor.
Ken
As Visvanath points out memory usage for those total of 150 users is critical. On our Windows server, each apache thread uses 100K (as shown in task manager), so look carefully at the total RAM that is available. One thought about the db connection error: what is the value of MAX_CONNECTIONS in your postgresql.conf file? I'm thinking that this could be the limiting factor.
Ken