Calendar partially imported, many faillures

I exported a calendar with almost 3000 events from Nextcloud 9.0.53. I then did a clean install of Nextcloud 12.0.3 on my BananaPi with Ubuntu 14.04 and Nginx. Everytime i try to import the ICS file I get the message "“Partially imported, 2000 failures)” (Everytime it is a different amount of failures, but always around 2000.)

Console in browser says: NetworkError: 502 Bad Gateway
/var/log/php7.0-fpm.log says: WARNING: [pool www] server reached pm.max_children setting (5), consider raising it.

I raised:
pm.max_children = 5000
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 30
pm.max_requests = 5000

I still get error messages like:
WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 188 total children

Is it due to amount of parallel processes that it will likely fail? I have seen several topics about this issue, and none of the posters found a solution. I also created a topic on Github. The owner of the project advised me to go to this forum to ask for the server configuration.

Similar topics:

Monitor your system during the imports. On ARM boards you usually have limited resources and putting too high limits could make your system unstable (when you run out of RAM and processes are killed). Perhaps the database is the bottleneck which can’t follow so quick and create new entries.

You could try to import events via a desktop software and don’t use the web-app. You could also try to split your calendar file and import it part-by-part.