fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
418 stars 290 forks source link

data-fix page error #3124

Open DaPoHou opened 4 years ago

DaPoHou commented 4 years ago

On the data-fix page, such error prompt will occasionally appear

DataTables warning: table id=data-fix-table - Ajax error. For more information about this error, please see http://datatables.net/tn/7

fisharebest commented 4 years ago

See https://webtrees.net/faq/xhr/

DaPoHou commented 4 years ago

1、

Request URL: https://www.xxxx.com/admin/data-fix/wang/fix-search-and-replace/data?draw=3&columns%5B0%5D%5Bdata%5D=0&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=false&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=1&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=false&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&start=0&length=10&search=%2F%3F%3F%2F&replace=&method=regex&case=&type=INDI&_=1584877753643
Request Method: GET
Status Code: 502 
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

1

2、

Request URL: https://www.xxx.com/admin/data-fix/wang/fix-search-and-replace/data?draw=4&columns%5B0%5D%5Bdata%5D=0&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=false&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=1&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=false&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&start=0&length=20&search=%2F%3F%3F%2F&replace=&method=regex&case=&type=INDI&_=1584877753644
Request Method: GET
Status Code: 502 
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

2

3、

Request URL: https://www.xxx.com/admin/data-fix/wang/fix-search-and-replace/data?draw=5&columns%5B0%5D%5Bdata%5D=0&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=false&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=1&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=false&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&start=0&length=10&search=%2F%3F%3F%2F&replace=&method=regex&case=&type=INDI&_=1584877753645
Request Method: GET
Status Code: 500 

3

fisharebest commented 4 years ago

What page-size do you select? (10/20/50/100/500/1000/all)

DaPoHou commented 4 years ago

10/20

fisharebest commented 4 years ago

will occasionally appear

Is there a pattern?

For example, specific search/replace patterns?

DaPoHou commented 4 years ago

Regular expression

The searched content and pattern are in the Request URL above

fisharebest commented 4 years ago

The error "502 bad gateway" means that the webserver

(a) passed the request to PHP (b) did not receive a response from PHP

This is usually caused by webserver configuration.

(a) timeout. The webserver will wait a fixed time for a response. Typically 60 seconds. If PHP runs for more than this time, the response is ignored. You should set the PHP time limit to be less than the webserver time limit.

If the database is very busy, then it can also cause long delays.

(b) The PHP script was not executed. If the server is busy, it will not be able to create the PHP process.

such error prompt will occasionally appear

If this happens occasionally (for a simple query) then my best guess is that the server is busy and cannot create the request.

DaPoHou commented 4 years ago

Nginx config:

    proxy_connect_timeout 300s; 
    proxy_read_timeout 300s; 
    proxy_send_timeout 300s;
    fastcgi_connect_timeout 300;
    fastcgi_send_timeout 300;
    fastcgi_read_timeout 300;

PHP.ini

max_execution_time = 120

max_input_time = 60

Mysql server is a separate server,and no other databases are running:

Intel® Xeon® Processor E5-2640 (15M Cache, 2.50 GHz, 7.20 GT/s Intel® QPI) 
64G Memory
DaPoHou commented 4 years ago

When I click "Search" on the "Add Missing Death Records" and "Fix name slashes and spaces" page. The same error will occur.

I have changed value in php-fpm.conf from request_terminate_timeout =120 to request_terminate_timeout =200

from max_execution_time = 120 to max_execution_time = 200

I checked the php-fpm.log file:

WARNING: [pool nginx-www] child 32432 said into stderr: "NOTICE: PHP message: PHP Fatal error: Maximum execution time of 200 seconds exceeded in /webtrees/vendor/illuminate/support/Collection.php on line 1858"

The problem still exists. With the same server configuration, everything was normal in version 2.0.1.