server load going to 25.00 +
Collapse
X
-
remember if you use mysql_pconnect () make sure you remove mysql_close () as it will cause errors ..
-
and make for chatroom just few mysql queries, because chatrooms with autorefresh are most active part of your site and use most of your server ressources, and you don't need the ban check or ip check query in the chatroom inside, put this on the page where user has to write a message.
Leave a comment:
-
Its a self setup chat script, its not similar to any over here. 24 sql queries on page. 4 queries i.e. ban check, ip ban check, trash check and ignore check are persistent. Out of the rest, action based query, room list query, inbox query, message querry, room name query and chat message limit query. So in total 10 or 14 mysql database queries per page load!Originally posted by GumSlone View Postwhat type of chat are you using?, check how many mysql queries are in the chatroom?
Singleton approach cannot help, I need parallel processing.Originally posted by antony2kx View PostI think maybe it can be the connection to the database, maybe too many connections are created, you should try the singleton programming approach, please revise your script make sure only one database connection is present per session for each user, that maybe, or as GumSlone said, it can be the queries. too many at once, i may presume, please check these things
DoneOriginally posted by something else View Postfor a quick fix you could try a persistent connection
mysql_pconnect ()

saw it mentioned somewhere by you, so had applied it then and there itself.
Bang on Target! I preserve chat posts for 7 days. The users want a leader board feature, they wish to outsmart each other in terms of chat posts they make in a week. In a way am torn apart between users demands and server capabilities. To top it all there is this certain section of religious fanatics who take away my users in the name of religion just coz am liberal and allow for anything. Anyways bringing that topic on here would be personal talk.Originally posted by GumSlone View Posti had a similar problem in the past wit a chat site,
to solve it i made a cron job which deletes all chatroom messages older than 15 minutes,
also i removed mysql queries which are not important for chatroom like inbox check if there are new messages.
I guess i will have to choose between server capability and user demand, as both cannot be served.
Leave a comment:
-
i had a similar problem in the past wit a chat site,
to solve it i made a cron job which deletes all chatroom messages older than 15 minutes,
also i removed mysql queries which are not important for chatroom like inbox check if there are new messages.
Leave a comment:
-
for a quick fix you could try a persistent connection
mysql_pconnect ()
Leave a comment:
-
I think maybe it can be the connection to the database, maybe too many connections are created, you should try the singleton programming approach, please revise your script make sure only one database connection is present per session for each user, that maybe, or as GumSlone said, it can be the queries. too many at once, i may presume, please check these things
Leave a comment:
-
what type of chat are you using?, check how many mysql queries are in the chatroom?Originally posted by morse View PostVery old topic bumped ! Kinda relevant to my current situation, site keeps on crashing again and again and again!! Chatrooms are quite a pain in the azz !!
Leave a comment:
-
Very old topic bumped ! Kinda relevant to my current situation, site keeps on crashing again and again and again!! Chatrooms are quite a pain in the azz !!
Leave a comment:
-
i have the probs same too... the cpu and memory usage are overload... that was make im bored to expand my script... maybe i must reduce same modules...
Leave a comment:
-
most those quieries are called when there needed i dont see anything runnng that shouldnt my server went ok on that script never went over 5% and was running 60 sites
Leave a comment:
-
well whats wrong with it then ? if its badly writtern.Originally posted by syrus View Postah yes another badly written edit/script
Leave a comment:
-
it has nothing to do with those ****y timers. im on about server load not site load.
Leave a comment:
-
how do u now the load time on this script brummi have you got coding so i cam add it on me site please
Leave a comment:
-
crazybrumi iam sure it not script problem may due to maxclient issue in http.conf file
can copy the top -c command here or PM me i wil help you
i haveing 3 years of linux server knowledge
Leave a comment:
-
ah yes another badly written edit/scriptOriginally posted by crazybrumi View Postlike i said garry i have removed things by debugging and seing what the issue was but it hasnt come up any good. if removed bits of coding etc but hasnt helped i even removed anything that wasnt really needed from other pages and it still was doing the same. iv recently moved from a dual core dedicated server to a brand new quad-core dedicated but its still same issue. if it was the server it would have laod 247 but even with ova 100 sites and a few sites with 20+ people on all the time when noones in the chatrooms my load is only 0.5-1.0
Leave a comment:
Leave a comment: