LNMP Lnmpa 504 Gateway Time-out Error resolution method

Source: Internet
Author: User
Tags vps

123systems VPS Put there for a long time no use, just W2 was stopped a few days, really boring, want to put the beautiful picture or put on the top, so, direct card wipe reload the 123systems VPS system, the small memory of the cutter, nature does not get the panel, direct LNMP, As a result, unexpected problems arose.

VPS Installation Lnmpa All the way smoother, seemingly long time, spent 2 hours or so (hey, enough depressing, late to write a 123systems$15/of the evaluation of the VPS), download source code, decompression is good, installation dedecms, completely OK. This source code, is provided by others, upload space needs to be installed and then restore the data, the problem in the restoration of data when it appeared, each time prompt: 504 Gateway time-out!

Because the background to restore a lot of data files, I found that the previous relatively small no problem, the problem always appears in the recovery of a large database file, the first thought may be PHP execution time problem, open/usr/local/php/etc/, edit php.ini file:

Max_execution_time is set to 0 (or a value above the current value)

After restarting the LNMP, disturbed to restore the data, OH, still 504, headache, continue to search for solutions.

Edit: httpd-vhosts.conf file under/usr/local/apache/conf/extra/

Find:

Php_admin_value Open_basedir

Modified to:

Php_admin_value Open_basedir "/home/wwwroot:/tmp/:/var/tmp/:/proc/:/etc/"

(#或者直接将它注释掉)

Then, restart the Lnmpa.

/root/lnmpa restart

Continue to recover, finally OK.

Although the problem was solved, however, I recall the previous installation on the BUYVM 128MB memory vps, but did not appear similar problems, it is relatively idle, I would like to try to install LNMP, do not add a try, the result, exactly as I expected, only the use of LNMP environment, dedecms the background perfect restore, There is no problem!

After the test is not difficult to see, small memory VPS may not adapt to Lnmpa, or use lnmp better, to avoid some unwarranted problems. In addition, the search found that there are friends in the use of LNMP in the process of 504 errors, although Zhao Jong did not encounter this problem, but, here together with a record, easy to meet the problem of friends to try:

1. Adjust the relevant settings of php-fpm.conf/usr/local/php/etc/(***lnmpa no this file!) )

<value name= "Max_children" >32</value>
<value name= "Request_terminate_timeout" >30s</value>

2. Adjust the relevant settings of the nginx.conf/usr/local/nginx/conf:

Fastcgi_connect_timeout 600;
Fastcgi_send_timeout 600;
Fastcgi_read_timeout 600;
Fastcgi_buffer_size 256k;
Fastcgi_buffers 256k;
Fastcgi_busy_buffers_size 512k;
Fastcgi_temp_file_write_size 512k;

Well, after all the above methods, you still encounter 504, Zhao Jong give a suggestion: Find a hammer out, to the computer, a hammer down! Haha, joking! You do not take seriously, Zhao Jong not you see the previous words produced by all the consequences of the responsibility Oh ~ ~ ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.