How to properly configure php-fpm

How to properly configure php-fpm

by Red Nano -
Number of replies: 0

I'm trying to configure moodle in order to perform some performance tests and after trying many many days, I can't find the solution for this issue:

By default, apache processess php with mpm_prefork - the theory is that, without any PHP proxy, apache manages to process all the PHP code itseld in a sub-optimal way.

I wanted to speed things up a little, so I set up php-fpm, set up a pool and gave it enough room so it does not run out of workers and configured apache to use mpm_event.

The issue is that, whenever I run tests against the platform on this configuration, I start getting issues from the test platform reporting no response from the web page.

The behaviour is exactly the same with nginx + php-fpm. I also noticed this error on PHP-FPM:


"PHP Notice:  Exception encountered in event observer 'block_recentlyaccesseditems\observer::store': Error writing to the database<ul style="text-align: left" data-rel="backtrace"><li>line 1634 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()</li><li>line 1809 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->set_field_select()</li><li>line 73 of /blocks/recentlyaccesseditems/classes/observer.php: call to moodle_database->set_field()</li><li>line ? of unknownfile: call to block_recentlyaccesseditems\observer::store()</li><li>line 155 of /lib/classes/event/manager.php: call to call_user_func()</li><li>line 75 of /lib/classes/event/manager.php: call to core\event\manager::process_buffers()</li><l"


AFAIK, you only have to set the database configuration on the config.php file, right?

Has enyone else encountered this kind of issues before? I'm starting to think my JMeter plan is just nuts and not working properly... :/

Does this error ring any bell? The web does look to run perfectly, although, it's a development environment and I don't know how to reproduce the error other than through the stress tests.

Average of ratings: -