Error 429 while bulk importing extensions

Hello guys, I have a problem during extensions bulk import.
When I try to import 50 or more extensions with a single csv file I get the following exception:

An exception has occurred

Exception : API Error: [POST] /events 429 - Too Many Attempts. at file /usr/share/vitalpbx/www/includes/rest_client.php on line 0

Error Trace

# File Function
1 /usr/share/vitalpbx/www/index.php:0 app\Core->run(…args);
2 /usr/share/vitalpbx/www/includes/app/Core.php:0 app\Core->_loadModule(…args);
3 /usr/share/vitalpbx/www/includes/app/Core.php:0 app\Core->loadModuleAction(…args);
4 /usr/share/vitalpbx/www/includes/app/Core.php:0 vitalpbx\OmbutelModule->__call(…args);
5 /usr/share/vitalpbx/www/includes/OmbutelModule.php:0 call_user_func_array(…args);
6 modules\import_extensions\import_extensionsDB->put(…args);
7 /usr/share/vitalpbx/www/modules/import_extensions/import_extensionsDB.php:0 modules\import_extensions\import_extensionsDB->process_extensions(…args);
8 /usr/share/vitalpbx/www/modules/import_extensions/import_extensionsDB.php:0 modules\import_extensions\import_extensionsDB->import_extension(…args);
9 /usr/share/vitalpbx/www/modules/import_extensions/import_extensionsDB.php:0 modules\import_extensions\import_extensionsDB->create_extension(…args);
10 /usr/share/vitalpbx/www/modules/import_extensions/import_extensionsDB.php:0 modules\extensions\DBStorage->importExtension(…args);
11 /usr/share/vitalpbx/www/modules/extensions/DBStorage.php:0 modules\extensions\DBStorage->save(…args);
12 /usr/share/vitalpbx/www/modules/extensions/DBStorage.php:0 modules\extensions\DBStorage->putExtension(…args);
13 /usr/share/vitalpbx/www/modules/extensions/DBStorage.php:0 EventLogger\EventLogger->addRecord(…args);
14 /usr/share/vitalpbx/www/includes/components/EventLogger/EventLogger.php:0 EventLogger\EventLogger->_addEvent(…args);
15 /usr/share/vitalpbx/www/includes/components/EventLogger/EventLogger.php:0 vitalpbx\rest_client->post(…args);
16 /usr/share/vitalpbx/www/includes/rest_client.php:0 vitalpbx\rest_client->execute(…args);

Sometimes instead I get:

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Other times this one:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /usr/share/vitalpbx/www/includes/ami.php on line 0

This last error can be solved extending the memory_limit of php-fpm (which is set to 128mb by default in a VPS installation).

ls there any request rate limiter that can be tuned in order to solve this issue?

Have you guys noticed this problem?
Can this be related to the new EventLogger?

Thank you in advance.

1 Like

Hello!

Yes, the Event Logger module has a “Rate Limit” of 60 requests per minute. We will increase it in the new version.

Regards!

Thanks for the answer.
I’ll check it again in the next release.

Best Regards

Hello guys!
With VitalPBX 4.1.0 R3, I’ve just tested the bulk import of more than 600 extensions.
It worked flawlessly!

Thanks again.
BR

1 Like