Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating tracking script for high traffic site

    I've created a script that is going to function as a toplist for referers, and are experiencing that it might not count correctly.

    the site has about 250k unique visitors per day. and what i would like to know is what am i doing wrong.

    It is going to track based on which domains sends visitors.
    the database table(mysql) has a date, domain_id, hits_in, hits_out.
    so when a visitors comes to the site, the script grabs the refferer, and grab only the domain from that string. then it checks in session variable if the user has been counted. if not, it checks to see if the date with that domain is in the database allready, if yes, update hits_in = hits_in+1, if not Insert domain with date, domain_id and hits_in = 1.

    What I'm wondering about is, that theese updates are not updating correctly if there are sseveral queries beeing made per second, if tis can cause it to not catch all the hits. anyone know anything about this? I wonder if i just need to have inserts, and have a crontab or something do update the toplist afterwards.

  • #2
    New Coder
    Join Date
    Jan 2007
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try checking the amount of connections to mysql your host allows at any one time.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •