Polls: Taking part in a public poll is very slow

Created on 28 Mar 2021  路  10Comments  路  Source: nextcloud/polls

First of all: Thank you for all the improvements in version 1.8.1!

What is going wrong?

If a non-registered user takes part in a poll via a public link, it can take (on our system) up to 40 seconds to just add a name and open the poll.

To Reproduce
Steps to reproduce the behavior:

  1. Create a poll with a public link
  2. Call the link in a browser where you are not logged in
  3. Type in a name an wait for the verification to finish
  4. This takes a long tine
  5. When the input field turns green try to hit the "ok" button.
  6. Nothing happens for a long time
  7. This can take almost a minute before you can start with the poll options

Expected behavior
The initial access to a poll should not take more than one or two seconds

Information about your polls installation

polls version 1.8.1

Fresh installation or update from a prior version (from which one)?
Updated from 1.7.*

How did you install this version?(Appstore or describe installation)
Online update

Information about your Instance of Nextcloud

Nextcloud version:
NC 20.0.7

Browser:
Latest Firefox an latest Chrome

Browser Logs

grafik
grafik

https://user-images.githubusercontent.com/8102905/112752476-93793e00-8fd3-11eb-966d-7c9724bea7e8.mp4

enhancement

Most helpful comment

Yes this now works perfectly. Thank you!
NC21.1
Polls 1.8.3

All 10 comments

Something is strange in the backend. The username check takes 172 ms on my test system. Any entries in the server log?

I have not noticed anything in the logs.
The system has almost 8.000 users. Maybe that plays a role.

The system has almost 8.000 users. Maybe that plays a role.

Possible. We iterate over the usernames to identify a forbidden name. Seems not a good solution for your installation. I will inspect this the next two days.

@brtptrs Thanks for the logs. Indeed it was the iteration over all usernames, which singnificatially slowed down the username check. I released a version, which should fix that: https://github.com/nextcloud/polls/releases/tag/v1.8.2

For documentation:

{"method":"validateUserName","time":1617225780,"operation":"find token","payload":"h...JS"}, // <1 second
{"method":"validateUserName","time":1617225780,"operation":"search groups","payload":""}, // <1 second
{"method":"validateUserName","time":1617225780,"operation":"search users","payload":""}, // 33 seconds
{"method":"validateUserName","time":1617225813,"operation":"simulation search users with","payload":"dummy4"}, // <1 second
{"method":"validateUserName","time":1617225813,"operation":"search participants","payload":""}, // <1 second
{"method":"validateUserName","time":1617225813,"operation":"search shares","payload":""}, // <1 second
{"method":"validateUserName","time":1617225813,"operation":"finished","payload":""} // <1 second

Now we know: An iteration over 8.000 users lasts about 30 seconds on your system. 馃槃

@brtptrs Can you confirm that the fix works?

We will be doing a manual upgrade today. Will report back then.

Yes this now works perfectly. Thank you!
NC21.1
Polls 1.8.3

I had the same problem with version 1.8. Unfortunately, it is not solved for me with the installation of version 1.8.3. I also have only 10 users. Nextcloud itself and all other apps run normally fast. I can reproduce the problem with different Nextcloud installations (but all on the same server).

@SSH-IT Please open a new issue and describe YOUR problem. Seems to be something different.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nextgen-networks picture nextgen-networks  路  6Comments

brtptrs picture brtptrs  路  4Comments

amittel picture amittel  路  5Comments

andriusign picture andriusign  路  6Comments

Jana702 picture Jana702  路  4Comments