Nginx server settings update for memory limit

  1. Update Memory limit in Ngnix server 

    1. Login to SSH through putty

    2. Redirect to PHP config file as like below.
     cd /etc/php-fpm.d   

     3. List all files from  “php-fpm.d”    directory using below comment
         ls -a

    4. Edit respective domain config file using below comment
         vi domainname.conf

    5. Use “i” letter in windows to change the comment view files into edit mode.

    6. Add below line if its not exist in the config file. OR update values based on your need.
          php_admin_value[memory_limit] = 500M
          php_admin_value[post_max_size] = 500M should be larger than upload_max_filesize and smaller than memory_limit.
          php_admin_value[upload_max_filesize] = 450M    (Important: This value should be low compare to other value)
          php_admin_value[max_input_time] = 3000
          php_admin_value[max_execution_time] = 3000

    7. user “Esc” and type “:wq” to save and quit. Also, please refer more file edit comment options below.
         vi filename — Edit file
         i to insert
         a to append
         x to delete
         dd to delete a line
         : to begin a command sequence
         :w to save
         :q to quit
         :q! to quit without saving
         :wq to save and quit

    8. Finally restart the PHP using below comments.

          In order to restart php-fpm, the correct command is
    # systemctl restart php-fpm

          To check the state of php-fpm following a restart you can         run:
    # systemctl status php-fpm

  2.   Still its not working! Please follow this post to increase  client_max_body_size value.

Leave a Reply

Your email address will not be published. Required fields are marked *