Error connecting to dB on specific search strings
This topic contains 26 replies, has 4 voices, and was last updated by Iain Brewster 6 years, 6 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: error connecting, search
-
AuthorPosts
-
April 16, 2019 at 2:07 pm #481125
Hi all,
I’m using V2 really happy with it.I have noticed something around the search function however and can’t scope the size of the problem.
When I search Novotel paddington or Novotel London
I get the wordpress error
“Error establishing connection to databse” of I just any other searches are fine and if I put something made up I. It will bring up the search not found result.Are you able to advise the potential issue?
I am unable to understand the pact of this as it seems to be around specific search.
Thanks
April 16, 2019 at 6:26 pm #481167Can you recreate the problem every time you search for those terms?
Normally database connections problems, are due to problems with the database server in shared hosting.
If you provide a link, admin and cpanel credentials in a private reply, we’ll have a look.
Thank you
April 16, 2019 at 6:55 pm #481175This reply has been marked as private.April 16, 2019 at 10:00 pm #481191This reply has been marked as private.April 17, 2019 at 5:05 am #481254This reply has been marked as private.April 17, 2019 at 12:51 pm #481343Hi Ian,
I seen a number of issues, firstly the search page was in the trash, i restored it and then its slug was conflicting with BP so i changed it.
For the number of listings you have and the plugins you are running your server spec is not really enough, please read this https://wpgeodirectory.com/making-your-wordpress-site-slow/
When you do a search that goecodes a location to GPS it then has to do some heafty SQL queries, how heavy they are depends on a few things but i would say the issue is simply that the server can’t handel it.
I’m not sure it is having any negative affect but i would check the cloudflare logs to see if maybe its triggering any security rules.
Thanks,
Stiofan
April 17, 2019 at 8:38 pm #481469This reply has been marked as private.April 17, 2019 at 8:49 pm #481478This reply has been marked as private.April 19, 2019 at 1:39 pm #481790Hi Ian,
The issues in your theme functions file is your custom code, it was malformed quotation marks, i have fixed those for you.
The server just is not up to the task, even this non specific non GD query done directly on the DB takes over 1 second
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'gd_place' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'closed' OR wp_posts.post_status = 'private' OR wp_posts.post_status = 'hidden') LIMIT 0, 10With that many listings you need to bump your server spec.
I would also not run a forum on the same site as a directory, a forum is a hungry plugin.If you need more advice about hosting please ask.
Stiofan
April 21, 2019 at 10:19 am #481985Really appreciate your help with this stiofan.
I think the support here is always incredible so thanks again.
With regards the server.
My current VPS spec is2 GB RAM.
2 Cores CPU.
120 GB Disk Space.
1.5 TB BandwidthWhere can I find what would be required to speed my site up?
Thanks again
April 21, 2019 at 10:43 am #481992You can read the recommended server requirements here: https://wpgeodirectory.com/docs/server-requirements/
April 23, 2019 at 5:00 am #482204This reply has been marked as private.April 23, 2019 at 12:58 pm #482310Hi Iain,
Who is your hosting with, even loading the cpanel is pretty slow for me. The changes did not seem to boost query times…
Where is the majority of your target users?
Stiofan
April 23, 2019 at 1:02 pm #482311This reply has been marked as private.April 24, 2019 at 6:34 am #482468This reply has been marked as private. -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket