New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The problem with the user's login name #1589
Comments
Where do you try to change the password? On the page where you edit the person or on the page with the list of usernames? |
I tried both options |
Do you have the newest master? I just tried and can't reproduce the problem. |
I use postgresql 9.4 can be a problem? |
Shouldn't be a problem, if it was then you should get sql errors. |
I see a problem in the module mod_admin_identity action action_admin_identity_dialog_set_username_password.erl. |
Do you have a longer traceback of the error? |
nor any error does not occur, I tried to put ?DEBUG, but the message does not appear in the console.probably need to do debugging for another |
If the message does not appear then the crash might be at a different spot. We still couldn't reproduce the issue :( |
docker can give way to test |
Docker? Might it be that you are having this issue? #1490 |
how to use it ? |
@heiheshang can you try with a 2 cpu instance? |
what for ? I want to save money |
I think this is an issue with the scheduler and only having a single scheduler/cpu. @heiheshang if you can't up the core count, then maybe start erl with more than 1 scheduler:
See http://erlang.org/doc/man/erl.html @ddeboer and @mmzeeman do you know the status of #1490 and if that might explain what is reported here? |
The bcrypt nif can't be used with a non-smp erlang. It won't compile. There is a port version of the same algorithm which should work though. |
For the above, see: https://github.com/smarkets/erlang-bcrypt#configuration Setting mechanism to 'port' might work. |
Should that be standard or is using the NIF better? |
Good one. The NIF has no limit on the number of simultaneous bcrypt operation, the port version does. We don't have to do it for speed, because bcrypt was designed to be slow anyhow. |
in zotonic you can set the parameters without changing the container docker ? I can use for this purpose erlang.config ? |
Yes, if you put this in your erlang.config {bcrypt,
[{mechanism, port}, {pool_size, 4}]
}, It will use the port version. This worked fine over here on zotonic stable. |
@mmzeeman what is the throughput of the port version? We might want to make it the default option if there is not problem with Erlang 19 (or later) and the overall performance. |
Bcrypt is designed to be slow. The pool size defines how many bcrypt operations can be done in parallel. This must be proportional to the expected traffic. The nif version starts an os-level thread and queues bcrypt operations to a single thread. My guess is that the port version is better for a busy server. |
That was also the gut-feeling I got. Good to have some back-pressure by limiting the number of parallel operations. I will change this default in the master and 0.x |
Assuming the issue is indeed bcrypt, the issue is further discussed in #1490 |
If username = email, you can not change the password. Admin crashes when you try to change your password. There is a restart. I am using the latest version 1.0
The text was updated successfully, but these errors were encountered: