Hi, it was with postgresql. However I expect it to be an issue with more databases, as I think it has to do with not locking the record. Postgresql supports concurrent transactions, which means that a record can be accessed for read concurrently. Updates of course lock a record. Now in the code I noticed a select and a few lines down the update. This will not give the expected behaviour of finding and locking a ip address, as in between these statements another thread can grab the ip address. I am not sure how transactions are implemented in mysql, but I would expect that they behave similar. Maybe try creating 255 ports in one go? multiple times? Cheers, Floris 2013/2/4 dan wendlandt