Fatal error using Requests::request_multiple
-
Hello,
first, thank you for taking the time to read me.
I wrote a plugin, doing in average one thousand requests each 5 minutes, using cron. It’s a lot I know but it’s not to brute force a form, DOS a server or spam. It’s only to crawl the Apple App Store to detect prices drops, updates and new releases using their API.
I disabled cron to execute it server side to be sure to not impact visitors. Using
define('DISABLE_WP_CRON', true);Everything works perfectly BUT sometimes my cron script return an error, hopefully cron notified me by email :
PHP Warning: require_once(/home/www/wp-includes/Requests/Response.php): failed to open stream: Too many open files in /home/www/wp-includes/class-requests.php on line 146 PHP Fatal error: require_once(): Failed opening required '/home/www/wp-includes/Requests/Response.php' (include_path='.:/usr/user/php/7.2.9/lib/php') in /home/www/wp-includes/class-requests.php on line 146 Warning: require_once(/home/www/wp-includes/Requests/Response.php): failed to open stream: Too many open files in /home/www/wp-includes/class-requests.php on line 146 Fatal error: require_once(): Failed opening required '/home/www/wp-includes/Requests/Response.php' (include_path='.:/usr/user/php/7.2.9/lib/php') in /home/www/wp-includes/class-requests.php on line 146This error does not occurs every time my cron script is executed, but only some times (~1 time each 2 hours). If someone can help me to debbug this problem, that would be awesome.
FYI, I already read some things aboutulimit, but I don’t want to change it.Thanks for your time, sorry for my english I’m french.
Sil3r
The topic ‘Fatal error using Requests::request_multiple’ is closed to new replies.