Search timeout.

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
NomadThanatos
Registered User
Posts: 5
Joined: Fri Jun 09, 2017 12:16 pm

Search timeout.

Post by NomadThanatos » Mon Sep 18, 2017 11:45 pm

My forums search for some keywords will be timeout.

Timeout result
https://frt-eve.com/search.php?keywords=bilibili
https://frt-eve.com/search.php?keywords=Discord
...

Normal result
https://frt-eve.com/search.php?keywords=bilibi => for empty result
https://frt-eve.com/search.php?keywords=EVE => for non-empty result
...

First I checked the nginx log.
And I found the reason I got 500 error is timeout.

Code: Select all

2017/09/18 23:34:04 [error] 3092#0: *1028 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/html/phpBB3/vendor/symfony/polyfill-mbstring/Mbstring.php on line 420" while reading response header from upstream, client: 108.234.23.251, server: frt-eve.com, request: "GET /search.php?keywords=bilibili HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "frt-eve.com"
2017/09/18 23:36:31 [error] 3092#0: *1070 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/html/phpBB3/vendor/symfony/polyfill-mbstring/Mbstring.php on line 420" while reading response header from upstream, client: 108.234.23.251, server: frt-eve.com, request: "GET /search.php?keywords=Discord HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "frt-eve.com"
Then I thought it might becasue the phpbb Native Fulltext is slow, so I swtich to Sphinx fulltext.
And I checked the sphinx log, found that it is pretty fast but I still get above timeout in nginx log.

Code: Select all

[Mon Sep 18 23:36:01.689 2017] 0.000 sec 0.000 sec [ext/2/attr- 5 (0,10)] [index_phpbb_c8d2e104f270c3ce_delta;index_phpbb_c8d2e104f270c3ce_main] Discord
[Mon Sep 18 23:37:55.110 2017] 0.000 sec 0.000 sec [ext/2/attr- 19 (0,10)] [index_phpbb_c8d2e104f270c3ce_delta;index_phpbb_c8d2e104f270c3ce_main] bilibili
[Mon Sep 18 23:39:58.211 2017] 0.000 sec 0.000 sec [ext/2/attr- 0 (0,10)] [index_phpbb_c8d2e104f270c3ce_delta;index_phpbb_c8d2e104f270c3ce_main] bilibi
[Mon Sep 18 23:50:44.451 2017] 0.000 sec 0.000 sec [ext/3/attr- 261 (0,10)] [index_phpbb_c8d2e104f270c3ce_delta;index_phpbb_c8d2e104f270c3ce_main] EVE
:shock:
Thanks in advance!

NomadThanatos
Registered User
Posts: 5
Joined: Fri Jun 09, 2017 12:16 pm

Re: Search timeout.

Post by NomadThanatos » Fri Sep 22, 2017 1:05 pm

BUMP...

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 20261
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Search timeout.

Post by RMcGirr83 » Fri Sep 22, 2017 1:41 pm

In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

NomadThanatos
Registered User
Posts: 5
Joined: Fri Jun 09, 2017 12:16 pm

Re: Search timeout.

Post by NomadThanatos » Sun Sep 24, 2017 2:45 am

Thanks for your reply.

I have tried to set to 300 secs and I still got timeout.
I am using Cloudflare CDN now so 300 secs would make CDN response 502.

I try to set to 90 secs.

Code: Select all

2017/09/23 22:16:14 [error] 18418#0: *50523 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Maximum execution time of 90 seconds exceeded in /var/www/html/phpBB3/vendor/symfony/polyfill-mbstring/Mbstring.php on line 420" while reading response header from upstream, client: 162.158.69.138, server: frt-eve.com, request: "GET /search.php?keywords=Discord HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "frt-eve.com", referrer: "https://www.phpbb.com/community/viewtopic.php?f=556&t=2439031"

Code: Select all

[Sat Sep 23 22:14:44.242 2017] 0.001 sec 0.001 sec [ext/2/attr- 5 (0,10)] [index_phpbb_c8d2e104f270c3ce_delta;index_phpbb_c8d2e104f270c3ce_main] Discord
My forums has 1k users and 1.5k posts now. I run it on a VPS.
I think there are not that much users and data, I am wondering why this is such slow...
Do others' forums search work well?

User avatar
kinerity
Registered User
Posts: 1098
Joined: Mon Sep 01, 2014 1:00 am
Name: Kailey Truscott
Contact:

Re: Search timeout.

Post by kinerity » Sun Sep 24, 2017 4:33 am

NomadThanatos wrote:
Sun Sep 24, 2017 2:45 am
I am using Cloudflare CDN
Cloudflare has been known to cause problems with phpBB. Have you tried removing Cloudflare just as a test?
Image

User avatar
Leinad4Mind
Translator
Posts: 804
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Search timeout.

Post by Leinad4Mind » Sun Sep 24, 2017 11:44 am

In your case I would backup the search tables and then delete the index and re-index again.
I would start by that.
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: funtent, hbrige55, janus_zonstraal and 22 guests