Index: trunk/Nebulous-Server/lib/Nebulous/Server.pm
===================================================================
--- trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 24386)
+++ trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 24387)
@@ -447,4 +447,10 @@
             if ($@ =~ $trans_regex) {
                 $log->warn("database error, retrying transaction: $@");
+                $parent_id = 1;
+                redo TRANS;
+            }
+            if ($@ =~ qr/Duplicate entry/) {
+                $log->warn("Duplicate database entry, retrying transaction: $@");
+                $parent_id = 1;
                 redo TRANS;
             }
