server load going to 25.00 +

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • something else
    replied
    remember if you use mysql_pconnect () make sure you remove mysql_close () as it will cause errors ..

    Leave a comment:


  • GumSlone
    replied
    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:


  • morse
    replied
    Originally posted by GumSlone View Post
    what type of chat are you using?, check how many mysql queries are in the chatroom?
    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 antony2kx View Post
    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
    Singleton approach cannot help, I need parallel processing.

    Originally posted by something else View Post
    for a quick fix you could try a persistent connection

    mysql_pconnect ()

    Done saw it mentioned somewhere by you, so had applied it then and there itself.

    Originally posted by GumSlone View Post
    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.
    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.
    I guess i will have to choose between server capability and user demand, as both cannot be served.

    Leave a comment:


  • GumSlone
    replied
    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:


  • something else
    replied
    for a quick fix you could try a persistent connection

    mysql_pconnect ()

    Leave a comment:


  • antony2kx
    replied
    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:


  • GumSlone
    replied
    Originally posted by morse View Post
    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 !!
    what type of chat are you using?, check how many mysql queries are in the chatroom?

    Leave a comment:


  • morse
    replied
    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:


  • ewanz
    replied
    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:


  • ori
    replied
    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:


  • crazybrumi
    replied
    Originally posted by syrus View Post
    ah yes another badly written edit/script
    well whats wrong with it then ? if its badly writtern.

    Leave a comment:


  • crazybrumi
    replied
    it has nothing to do with those ****y timers. im on about server load not site load.

    Leave a comment:


  • mentalhosting
    replied
    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:


  • kiss of death
    replied
    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:


  • syrus
    replied
    Originally posted by crazybrumi View Post
    like 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
    ah yes another badly written edit/script

    Leave a comment:

Working...
X