From: Chaos E. <cha...@gm...> - 2007-03-11 05:06:01
|
Helo On 3/10/07, Ervin Heged=FCs <ai...@gm...> wrote: > Hello, > > > Since your script is run by cron every one minute, i wonder that do > > you have any lock mechanisms to prevent more than one instance of your > > script to start? > It's very interesting theory... chaos@felucia:~$ ps afx|grep sleep 25170 ? Ss 0:00 | \_ sleep 300 25246 ? Ss 0:00 | \_ sleep 300 25324 ? Ss 0:00 | \_ sleep 300 25403 ? Ss 0:00 | \_ sleep 300 25486 ? Ss 0:00 \_ sleep 300 25530 pts/5 S+ 0:00 | \_ grep sleep chaos@felucia:~$ crontab -l # m h dom mon dow command * * * * * sleep 300 have i missed something? > > > some buggy or mis-configured ldapserver can not work > > properly when large amounts of write operations come simultaneously. > Hmmm... I think there is _no_ other thread (or process), what wants to > write to database. Still dont get it? > > > What I suggest is carefully re-design your script. use some lock > > mechanisms and some queue technologies. > > I don't think so it any LDAP client requires this feature. It's like any > SQL server needs to lock a table, when a client wants to insert a > simple record. > (Don't wrong me: I know, there are many cases need to lock a table, > but IMHO that's for other cases) > > Handle the clients requests is the most common function of any kind > of "database" servers - in this case the database word means any kind > of structure-handle application. :) But this is a flame-way, sorry. > > Back to my problem: on that machine there is just one user, who gets > access to LDAP db, and that user write to db _only_ when original list > was modified. That's occurrence is 1-5 event per week...(!) If the event only occures 1-5 time per-week, why you make your script run every minute? > > Thanks: > a. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share y= our > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev > --=20 Best Regards Chaos Eternal |