lnamp
The VPS of 123systems has been there for a long time without any use, and W2 happened to be stopped for a while. It was really boring, and I wanted to put pictures of beautiful women on it, so I just wiped the card and reinstalled the system of the VPS of 123systems, which has a small memory of $15. Naturally, I didn’t bother with the panel anymore and just LNMP. As a result, unexpected problems occurred.
VPS installation LNMPA went smoothly, it seemed to take a long time, it took about 2 hours (oh, it’s depressing enough, I will write a review of 123systems $15/year VPS later), download the source code, and unzip it All good, install dedecms, completely OK. This source code is provided by others. The upload space needs to be installed before restoring the data. The problem occurs when restoring the data. Every time it prompts: 504 Gateway Time-out!
Because there are a lot of data files to be restored in the background, I found that the smaller ones are no problem, but the problem always occurs when restoring a certain large database file. The first thing I thought was that it might be a PHP execution time problem, so I opened /usr/local /php/etc/, edit the php.ini file:
Set max_execution_time to 0 (or a value higher than the current value)
After restarting LNMP, I restored the data anxiously, 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

change into:

php_admin_value open_basedir "/home/wwwroot:/tmp/:/var/tmp/:/proc/:/etc/"

(#or comment it out directly)
Then, restart LNMPA.

/root/lnmpa restart

Continue to restore, finally OK.
Although the problem has been solved, I recalled that I installed it on buyVM's 128MB memory VPS before, but no similar problems occurred. I am really free. I want to try installing LNMP without adding A. I tried it, and the result was exactly as I expected. Using only the LNMP environment, the dedecms background was restored perfectly without any problems!
After the above test, it is easy to see that the small memory VPS may not be suitable for LNMPA. It is better to use LNMP to avoid some unwarranted problems. In addition, during the search, I found that a friend encountered a 504 error when using LNMP. Although Good VPS did not encounter this problem, it is recorded here so that friends who encounter problems can try it:
1. Adjust the relevant settings of php-fpm.conf /usr/local/php/etc/ (***LNMPA does not have this file!***)

<value name="max_children">32</value>
<value name="request_terminate_timeout">30s</value>

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

fastcgi_connect_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
fastcgi_buffer_size 256k;
fastcgi_buffers 16 256k;
fastcgi_busy_buffers_size 512k;
fastcgi_temp_file_write_size 512k;

Well, after going through the above methods, if you still encounter 504, Good VPS would like to give you a suggestion: find a hammer, point it at the computer, and hammer it down! Haha, just kidding! Guys, please don’t take it seriously, Good VPS is not responsible for any consequences of what you said above~~~


Hong Kong/United States/Domestic High Speed ​​VPS

postid
20808

Leave a Reply