Cron Job causing server lag

Discussion in 'PHP' started by slb, May 15, 2007.

  1. #1
    I run a MMORPG text based & turn based game. Cron jobs runs every 10 minutes to hand out turns to all players. And please bear with me as I am not very technical, so my questions may appear a little crude.

    When this 10 minute cron runs, my server will lag as much as 30 to 45 seconds. At no other time, does my server lag at all, and runs very smooth and fast. It ONLY happens at the time this runs. Only when this cron runs. I have a dedicated Dual Xeon 2.8ghz server with plenty of ram/resources. Since my game is sort of new, only about 2000 registered users, it is not like I have too many people online at the same time..... usually between 40 to 90 people online at the same time, so I can't see that as the problem. My technical person will be out of town for over a month, and with the current rapid growth of my game, I feel like this needs to be addressed fairly quickly. Oh, one other things, we upgraded from a dedicated pentium 4 server with less resources, about 10 days ago, and I honestly don't remember this being this bad before the upgrade.

    Any suggestions would be greatly appreciated. also, is there another way to achieve what the crons do in another fashion?

    If I have posted in the wrong section, I sincerely apologize.
     
    slb, May 15, 2007 IP
  2. ruby

    ruby Well-Known Member

    Messages:
    1,854
    Likes Received:
    40
    Best Answers:
    1
    Trophy Points:
    125
    #2
    Could be a database issue... might need some tuning etc. Hard to tell without having a look at it.
     
    ruby, May 15, 2007 IP
  3. gibex

    gibex Active Member

    Messages:
    1,060
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    95
    #3
    db tuning, sql query optimization ....
     
    gibex, May 16, 2007 IP
  4. Weizheng

    Weizheng Peon

    Messages:
    93
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    tmp file, virtual memory settings?
     
    Weizheng, May 17, 2007 IP
  5. bibel

    bibel Active Member

    Messages:
    289
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #5
    You can either upgrade your server (temporary solution), or hire a coder to optimise your database/scripts
     
    bibel, May 17, 2007 IP