[phpOpenTracker-general] mysql error: duplicate entry

Jan Prieser <[email protected]> Fri, 2 Dec 2005 20:13:32 +0100
Newsgroups gmane.comp.web.phpopentracker.general
Message-ID <[email protected]>
Hi,

i'm trying to upgrade my application to php 5 and get some strange
results with the pot logging engine.
My poterror.log shows 'duplicate entry "random" for key 1' every few
days on my production system (Xeon 32bit, suse 9.3, php 4.3, apache
1.3, libmysql 4.0).

pot version is 1.5.2 and mysql-server 4.0.16

on my test machine (AMD64, suse 10, php 5.0.5, lighttpd 1.4.7, libmysql 5.0.15)
the errorlog is flooded with 'Duplicate entry '2147483647' for key 1'
on almost any request without cookies.
Its not every request but a huge number, lets say 70-80%

i printed the queries which causes mysql to throw this error and there
is not a single one which really tries to insert a value of 2147483647:
02-12-2005 19:50:24: Duplicate entry '2147483647' for key 1  query:INSERT
           INTO pot_visitors_200512
                (client_id, accesslog_id,  visitor_id,
                 operating_system_id, user_agent_id, host_id, referer_id,
                 timestamp, weekday, hour,
                 returning_visitor)
         VALUES ('7', '3197395057', '3197395057', '4180889879', '582640211', '3132876597', '0', '1133549424', '5', '19', '0')

although there is an entry for 'select * from pot_visitors_200512
where accesslog_id = 2147483647'


if I use cookies on the client side, everything works just fine.
My bad this client doesn't use cookies and i still want to track the
Requests.

another confusing issue is, mysql throws the same error regardless
which mysql client i try to use (php5, php4, cli) on mysql4 and mysql5

i just don't know where to start my further investigations. the
production system just runs fine.

any hints on this?

thanks,
jan prieser