Skip to content

Configure PHP Settings in rConfig V8 Core

After reading this page, you can locate the active php.ini file on your rConfig V8 Core server, raise the memory_limit and max_execution_time values to suit your device count, and confirm the new values took effect. This prevents the timeout and out-of-memory failures that hit large configuration downloads, reports, and bulk operations.

PHP ships with conservative defaults (often 128M memory and a 30 second execution limit) that suit small web apps but not a network configuration manager processing large config files across many devices. Tune these settings when you see “Allowed memory size exhausted” errors, tasks that fail part way through, or sluggish reports as your inventory grows.

  • Shell access to the rConfig server with sudo privileges
  • The PHP version your install uses (run php -v to confirm, usually 8.3)
  • A maintenance window, since editing php.ini requires a PHP and web server restart
  • Familiarity with the V8 Core installation guide layout

memory_limit is the maximum memory a single PHP process can use before PHP terminates it. rConfig needs headroom here when processing large config files, generating reports with extensive history, or running bulk operations across many devices. Too little shows up as “Allowed memory size exhausted” errors during downloads, report generation, or bulk actions.

max_execution_time is how long a PHP script may run before PHP kills it. The default protects the server from runaway processes but can cut off legitimate long operations such as downloading configs from hundreds of devices or generating large audit reports. The queue system handles most long-running work in the background, so prefer it over ever-larger execution times for very large jobs.

These values assume a server dedicated to rConfig, where PHP is the primary memory consumer. They allocate roughly 75-85% of RAM to PHP, leaving the rest for the OS, database, and web server. Reduce them if other memory-intensive applications share the host.

Server RAMRecommended memory_limitDeployment size
4GB3072M (3GB)Small: under 500 devices
8GB6144M (6GB)Medium: 500-1,000 devices
16GB12288M (12GB)Large: 1,000-5,000 devices
32GB+28672M (28GB)Enterprise: 10,000+ devices
Environment sizeRecommended max_execution_timeRationale
Small (under 100 devices)300 seconds (5 minutes)Most operations finish within this window
Medium (100-500 devices)600 seconds (10 minutes)Bulk operations need extended processing
Large (500-1,500 devices)900 seconds (15 minutes)Tasks span many devices
Enterprise (1,500+ devices)1200 seconds (20 minutes)Large-scale operations need the most time

PHP can use different php.ini files for the web server (PHP-FPM or Apache) and for command-line and queue operations. Settings must match across both for rConfig to behave consistently. Print the active file with:

Terminal window
php -i | grep "Loaded Configuration File"

Common locations:

  • Ubuntu/Debian: /etc/php/8.3/fpm/php.ini, /etc/php/8.3/apache2/php.ini, /etc/php/8.3/cli/php.ini
  • CentOS/RHEL/Rocky/AlmaLinux: /etc/php.ini for FPM, Apache, and CLI
  1. Confirm your PHP version and the active config file path.

    Terminal window
    php -v
    php -i | grep "Loaded Configuration File"
  2. Back up the configuration file. If you run Apache rather than PHP-FPM, back up its php.ini too.

    Terminal window
    sudo cp /etc/php/8.3/fpm/php.ini /etc/php/8.3/fpm/php.ini.backup.$(date +%Y%m%d)
    sudo cp /etc/php/8.3/apache2/php.ini /etc/php/8.3/apache2/php.ini.backup.$(date +%Y%m%d)
  3. Open the configuration file in an editor.

    Terminal window
    sudo nano /etc/php/8.3/fpm/php.ini
  4. Locate memory_limit. Press Ctrl+W, type memory_limit, press Enter. Change the value to suit your server RAM, for example:

    memory_limit = 6144M
  5. Locate max_execution_time. Press Ctrl+W, type max_execution_time, press Enter. Change the value to suit your deployment size, for example:

    max_execution_time = 600
  6. Save and exit. Press Ctrl+O, then Enter to confirm, then Ctrl+X.

  7. Restart PHP and your web server.

    Terminal window
    # PHP-FPM with Nginx
    sudo systemctl restart php8.3-fpm
    sudo systemctl restart nginx
    # Apache
    sudo systemctl restart apache2
  8. Verify the new values.

    Terminal window
    php -i | grep memory_limit
    php -i | grep max_execution_time

The command-line check above verifies the values used by CLI scripts and queue workers. To confirm the web interface also picked up the change, run a resource-intensive task such as generating a large report, then check the Application Log for any memory or timeout errors. If the operation completes cleanly, the configuration is adequate.

If you also cleared application caches as part of an update, refresh the rConfig cache so it does not serve stale config:

Terminal window
php /var/www/html/rconfig/artisan rconfig:clear-all

This command clears the Laravel cache and config. See the CLI commands reference for full details. It is not required just for a php.ini change, but it is useful after broader configuration work.