Page 1 of 1
Main Website is Very Slow
Posted: Mon Jun 06, 2011 7:11 pm
by epolyglot
The main website is very slow and often gives an error that a sql connections is unavailable. Is there any easy and not too expensive way to fix this? If it is a simple question of a little money, perhaps I could raise a little money for the project. If it a more complicated technical issue, perhaps I could help. Is this the appropriate place to raise the issue and discuss this question?
Re: Main Website is Very Slow
Posted: Mon Jun 06, 2011 7:30 pm
by Lord_Farin
epolyglot wrote:The main website is very slow and often gives an error that a sql connections is unavailable. Is there any easy and not too expensive way to fix this? If it is a simple question of a little money, perhaps I could raise a little money for the project. If it a more complicated technical issue, perhaps I could help. Is this the appropriate place to raise the issue and discuss this question?
This error came up today (AFAIK), normally it does not show up. I have no idea as to what is the origin, and hopefully euler will fix it soon. This is indeed the right place to air such difficulties.
Re: Main Website is Very Slow
Posted: Mon Jun 06, 2011 7:37 pm
by hk
Last week a very nice article about Project Euler appeared in the magazine "the Atlantic".
http://www.theatlantic.com/search/?sort ... &q=jsomers
The last few days we had unusually many users connected simultaneously. We suspect that it has to do with this article.
Our ISP has increased max_connections for the SQL server and has increased our RAM allowance now.
Nevertheless it might be that the website is somewhat sluggish the coming days.
We expect that the load will get down in a few days.
Re: Main Website is Very Slow
Posted: Mon Jun 06, 2011 8:12 pm
by euler
Sorry guys!
The main website can cope with up to 150 members currently solving problems, but with the recent attention there is regularly over 200 members currently active and this is proving to be a little too much. Even though caching is used in as many places as possible the current load on the MySQL server has indicated a serious efficiency issue and a fundamental programming flaw in the way the database is being connected with. One of my summer projects was to do a rewrite of the website engine the powers Project Euler and the need to do so has been strengthened by this. Unfortunately there is little more that can be done right now. As Hans said, we will have to weather the storm for the moment and hopefully the load will naturally settle over the next couple of days. If things continue to be a problem I may have to temporarily suspend certain "luxury" features to ensure that the core elements of the website are being prioritised.
Re: Main Website is Very Slow
Posted: Mon Jun 06, 2011 10:06 pm
by Lord_Farin
euler wrote:One of my summer projects was to do a rewrite of the website engine the powers Project Euler and the need to do so has been strengthened by this.
I have done some MySQL query efficiency improving in the past, and PHP development takes up quite a lot of my free time. Please, feel free to ask for any help or suggestions if necessary. Some more minds and pairs of eyes can really open up new perspectives and resolve tedious debugging.
Re: Main Website is Very Slow
Posted: Mon Jun 06, 2011 10:53 pm
by euler
Thanks, Lord_Farin; PM sent.
euler wrote:If things continue to be a problem I may have to temporarily suspend certain "luxury" features to ensure that the core elements of the website are being prioritised.
You may have noticed a significant performance boost. I have taken steps to temporarily disable the "number of users online" feature, which involved regular updates to a "last_visit" field in each member's profile in the database. Although this was a useful feature, and which helped to provide a sense of real-time community in letting members know how many other members were online with them at any one time, it seems a reasonable compromise for the moment.
Re: Main Website is Very Slow
Posted: Wed Jun 15, 2011 1:47 pm
by krapock
hello,
I've read the "logged count" problem in the 7-6-2011 news.
Instead of comparing a date from the User table, can't you just count the number of php sessions ?
Of course, you will have the anonymous users counted in, since they certainly have a session too.
The workaround is to create a counter (in the PHP globals or in the BD) that will increment when a user logs in and decrement when he logs out OR his session is destroyed (time-out or server restart/graceful restart).
This way, you can have the user count AND the logged user count without waste of CPU