Location Search Still Not Working
I still do not have location-only search working on my site at
www.coloradojobbase.com. This is critical to my site and I am getting a lot of user complaints. When a search just using location of either a city (e.g. Denver) or zip code (e.g. 80202) is used without any keywords in the "All Jobs" side of the search box, after about 5 seconds it returns a completely blank page. No theme, no nothing. I have been in contact with my host, Lightning Base, and they said the following:
When you get a white screen in WordPress, it will almost always log an error at /public_html/error_log - checking that file, I see this:
[22-Feb-2014 18:18:48 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in /home/colorado/public_html/
wp-includes/
wp-db.php on line 1565
That shows PHP is running out of memory. That's pretty wild, because we allocated 256 MB of memory to PHP, which is a tremendous amount for WordPress. It's not surprising a lot of users are seeing problems, as there are plenty of hosts that allocate half that or less.
You might ask the developer if they have a recommendation as to how much memory should be allocated to PHP, and send them the error. Running out with this much memory available makes me think there is something wrong. We may be able to increase that allocation, but it's not an ideal solution. We have never had a user need more than 256 MB, which gives you an idea as to how unusual that would be. It would be interesting to know if the developer sees this kind of memory usage as expected or something that indicates an issue.
Let me know what they say (copying their exact response in here may help) and we can assist.
I have a local test environment set up with the latest version of Wordpress and the latest (as of 2/22/2014) dev build of Job Roller. I have five test jobs added and the location search works there. I started with no plug-ins or theme modifications and tested the location search after adding back each individual plug-in and modified theme files. The location search work correctly for each.
Colorado Job Base has about 7,000 jobs listed on it. About 50 of those were added by employers using the standard Job Roller form. The remaining jobs have been imported using
WP All Import Pro v3.3.5. Those imported jobs include employer name, job title, job category, job type, city, date, URL and lat/longs.
I run six plug-ins:
All in one Favicon
AppThemes Updater
Export Users to CSV
FXtender Pro (for JobRoller)
Google XML Sitemaps
WP All Import Pro
I have slightly modified these JobRoller files for function and appearance:
footer.php
index.php
sidebar-sjob.php
style.css
style-pro-blue.css
theme-geolocation.php
tpl-login.php
I have setup a clone of my site at
http://test.coloradojobbase.com and installed the latest dev build as of today with no plugins and no modifications, but all 7,000 jobs. Location search does not work on that site.
I received this from Lightning Base:
Sounds good. Did you send the message regarding memory usage to your theme dev? And do you know how much memory your local environment allocates to PHP? I suspect the issue may be that the way the search is coded, any search with a lot of results (or maybe just a huge dataset to search through) uses a huge amount of memory. It may be possible to fix this by increasing the memory allocation to PHP, but we can't do that indefinitely, so it would be better to get things setup so it doesn't have such tremendous memory usage.
Let me know what you find or if you your developer responds.
So my question to AppThemes is whether there is an issue with your search code that prevents it from scaling to sites with thousands of jobs because of how it manages memory and, if so, what can be done about it.
My second question is why a search that includes keywords on the left side of the search box (e.g. Accountant) combined with a location on the right side of the search box (e.g. Denver, CO) works while a search with only a location does not.
This is a critical issue for my site and is directly effecting my user base and, therefore, my revenues. I would appreciate a response ASAP.
Thanks