server load going to 25.00 +

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

    #16
    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.
    tinyurl.com/earnbymobile
    Easy earning for Indians
    ---------------------
    Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android
    goo.gl/6vub3

    Comment


      #17
      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.
      Advertise your mobile site for FREE with AdTwirl

      Comment


        #18
        remember if you use mysql_pconnect () make sure you remove mysql_close () as it will cause errors ..

        Comment

        Working...
        X