The information provided is not sufficient to provide a definitive answer, in particular, when it comes to database connections it’s important to make the distinction between regular database connection and custom ones.
Given the sort of error I’m inclined to assume this is a custom database connection and if this is correct then you have to have in mind there’s a component provided by you that may impact the creation of users. The general recommendation for custom database connections is to instrument your custom database scripts with
console.log statements and then use the Real-time Webtask logs extension to analyze the output when you trigger the failing scenarios (in this case, user creation).
Another troubleshooting measure that can be used to be sure if the problem lies with custom database scripts is to just create a temporary regular database connection and create a user for that one; if all goes well, this further suggests that the issue is how you implemented and/or configured the custom database.
In addition, if the instrumentation of the customs scripts does not point you to the source of the problem then you should update the question with additional information, in particular, which scripts you implemented in the custom database and ideally how they were implemented.
Finally, if this has nothing to do about custom databases, it might be account specific given I could not reproduce an issue with regular database connections on my own account. If that happens we may need a completely different set of information, but for now I’m assuming it’s a custom database.