Polls app breaks my Nextcloud 22 Performance

Nextcloud version: Nextcloud 22.1.1
Operating system and version: Ubuntu 20.04.3 LTS
Apache or nginx version: 2.4.41
PHP version: 8.0.11
mariadb: 10.3.31
cores: 4 x 2.2 GHz
php - memory_limit: 4 GB
timout time php: 3600
php - max data to upload: 2 MB

The issue you are facing:

hey im new to this forum and i have a problem that i cant get rid off since days, hopefully i can find help here :heart:

Sometimes the survey app shows error no survey found, but when you reload or look at the survey at a later time, the survey is there again. If many people are in the polls app and request some surveys at the same time the whole frontend is very slow (pages in nc loads 40 seconds ~). With “htop” on you can see that the load of one single core goes to 100% but the other cores are off load.

I did everything on this site to better the perfomance: https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html
Except for Redis as a session handler for the webserver. Php-fpm is the session handler for php.

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. Go to all surveys in the polls app
  2. Open up a random survey (the first survey normally loads fast)
  3. Then go to “all surveys” again
  4. Open up another survey (sometimes the second survey loads also fast then repeat “step 2-4”)
  5. 404 Error Survey not found page appears

Steps to replicate it 2.0:

  1. Go to all surveys in the polls app
  2. Open up many polls in different tabs at the same time (some of them will have the error 404)

other noticable erorrs:

the nc instance sometimes cant load avatar pictures and statuses of the user. is my file backend maybe too slow? how can i improve the speed?

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'id',
  'passwordsalt' => 'pw',
  'secret' => 'pw',
  'trusted_domains' => 
  array (
    0 => 'cloud.de',
  'allow_local_remote_servers' => true,
  'datadirectory' => '/home/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://cloud.de',
  'overwriteprotocol' => 'https',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'user',
  'dbpassword' => 'pw',
  'default_phone_region' => 'DE',
  'default_language' => 'de',
  'default_locale' => 'de',
  'installed' => true,
  'app_install_overwrite' => 
  array (
    0 => 'files_bpm',
    1 => 'dropit',
    2 => 'epubreader',
    3 => 'zimbradrive',
    4 => 'talk_simple_poll',
    5 => 'admin_notifications',
    6 => 'announcementcenter',
    7 => 'dashboardcharts',
    8 => 'ldapcontacts',
    9 => 'social',
    10 => 'files_fulltextsearch_tesseract',
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/run/redis/redis-server.sock',
    'port' => 0,
    'password' => 'pw',
    'dbindex' => 0,
    'timeout' => 1.5,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
  'loglevel' => '2',
  'remember_login_cookie_lifetime' => '1800',

output of chrome console log when it fails to load the whole survey:

Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
polls.js?v=8c029820-15:2 Error loding options Object Object
list @ polls.js?v=8c029820-15:2
poll/24/options?time=1633597354616:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
poll/24/poll?time=1633597354612:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
poll/24/votes?time=1633597354618:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR

This kind of issues are better placed on github and you will get an answer faster.

And to get deeper into this, we need more information from the logs (backend and browser console). And: If you say many people; How many are many people.

If you are experiencing a high load, it would be helpful to know, which process causes the load. Every observation right in time, when the error occurs will help to understand better.

I also think Github is the better place.

Perhaps you can use transitional the app Forms instead of Polls.

I use Forms instead of Polls for my surveys. After the “survey” with Forms you can export the answers to csv and analyse the results.

thank you very much for your answer!

with many people i mean like just 4-5 people. sorry, i wasn’t really precise there, but the issue can simple be triggered by one person loading many requests.

i freshly installed two instances of nc now and none of them had this issue with the polls app. it’s more probably another plugin causing this behaviour.

what kind of logs are needed when im searching for plugin errors?

this is error is spammed in my nc log on the webpage:

TypeError: Unsupported operand types: int & array

this was fixed when i disabled the groupfolders plugin and now my instance is a lot faster (~2 seconds). but the bug with no polls found still exists. maybe it has something to do with redis not working right.

hmm forms even seems to be officialy highlighted by nc in comparison to polls. i will try it out, thank you!

For clarification: Polls is for simple polls like doodle does. Forms is more suitable for surveys, like you can do with i.e. google forms.

Forms is highlighted, because it is managed by nextcloud, polls not (although forms is a fork of polls).

Everything is logged to the central log of NC.