The file sync.php runs each day and does the enrolment but sometimes it writes the following message at the end of the log: "!!! Error writing to database !!!"
So I think the execution of the script interrupts but I don't know why.
How is it possible to understand the cause od this error?