<p>I've just ran into this myself this morning. It looks to be related to the SmartMaps plugin doing an IP > Geo lookup using an external service. </p>

<p>Specifically it looks like it's using this api :<a href="https://geoip.maxmind.com/geoip/v2.0/">https://geoip.maxmind.com/geoip/v2.0/</a> which is hanging. </p>

<p>Disabling the plugin fixed my loading issues. </p>

CC BY-SA 3.0
2014-11-03T13:12:56.900Z
I also had CURL errors, not just related to SmartMap, but that did show up as one of the errors.
Seán O'Grady
CC BY-SA 3.0
2014-11-03T15:24:58.407Z
Hey Joel and Sean, which version of Smart Map are you running? Some changes have been made recently to alleviate issues like this.
Lindsey D
CC BY-SA 3.0
2014-11-03T19:37:33.707Z
I'm using 2.0.8
Seán O'Grady
CC BY-SA 3.0
2014-11-19T18:39:32.130Z
**UPDATE:** Several recent iterations of Smart Map have reduced the dependence on 3rd party services. As of version 2.0.12, the visitor geolocation feature has been made optional, and even disabled by default. For those users who still require geolocation of their website visitors, a subscription to MaxMind is highly recommended (instead of relying on the free, but unstable, FreeGeoIp.net).
Lindsey D
CC BY-SA 3.0
2014-11-03T11:33:51.390Z
2014-11-03T11:33:51.390Z
Joel Bradbury
<p>Could you upload a "non Craft" php-file, restart the server, and check if this file also loads slow? If it does, the server has probably some kind of an issue, and you should contact your hoster.</p>

<p><strong>If not, try:</strong></p>

<ul>
<li>deleting the <code>/craft/app/storage/runtime</code> directory.</li>
<li>bumping up the php <a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit"><code>memory_limit</code></a>.</li>
<li>contacting P&amp;T support from the Dashboard widget. They love environmental issues (So I've heard... *cough*).</li>
</ul>

CC BY-SA 3.0
2014-07-17T19:47:44.383Z
I did load an info.php to dump my environment information and it loads immediately without any issue from both the browser as well as a curl statement.  I'll look into the other options.  Right now my php memory is set to 128 MB - which I've read in the requirements is enough.  I removed the runtime directory and that did not help either.  I turned on slow query logging to see if anything would spit out - nothing shows up.  Slow query threshold at 2 seconds.
Shane Kaszyca
CC BY-SA 3.0
2014-07-17T20:02:03.253Z
Ok, it looks more and more like an environmental issues. You should contact P&T now ;)
Victor
CC BY-SA 3.0
2014-07-16T12:48:43.917Z
2014-07-16T12:48:43.917Z
Victor
<p>Hello Craft community,</p>

<p>My team and I have built a site for a client and it looks great.  The site runs just fine in my developers local environment and we're all very happy.  I have the site now set up on my preproduction Red Hat environment and when I access it there is about 30 seconds of latency, every single time.  I cannot figure out where this latency happens, perhaps there is a configuration somewhere I am missing?</p>

<p>I can access images, js files, etc. without any issue - but once I hit a php file in the Craft environment, things are super slow.</p>

<p>I tried turning the devMode flag to false in the general configurations and that didn't seem to help.  </p>

<p>This has nothing to do with my browser - I've tried a straight CURL to the URL and I see the same amount of lag.  Perhaps there's some server-side caching I need to enable?  Like I said - this is not just with my site, it was slow during the install as well as when I just access the admin tool to look at/change configurations.  Please help!</p>

CC BY-SA 3.0
2014-07-16T13:06:37.663Z
Have you any api calls that have hit their rate limit... that caught me out twice!
Seán O'Grady
CC BY-SA 3.0
2014-07-17T19:48:48.237Z
Sean - what kind of API calls?  I am just trying to hit my home page of my site of the landing page, and nothing.  Even if I was hitting an API - I'm no where near a rate limit, I'm the only one hitting it! :)
Shane Kaszyca
CC BY-SA 3.0
2014-11-03T03:46:35.163Z
Depends on if you are using PHP FPM, recently had an issue with nginx as a proxy to Apache but it was a PHP specific error, trying a PHP info page as well as a static html page and isolate if it's PHP or the Apache/nginx server.
Jason McCallister
CC BY-SA 3.0
2014-11-03T07:09:27.527Z
I think Sean meant external APIs like Twitter, Instagram, etc. Check that permissions are correct on your preprod server. Enable devMode, how many queries is the page doing? Do you have open basedir restrictions in your php config?
André Elvan
CC BY-SA 3.0
2014-11-03T11:17:55.087Z
@ShaneKaszyca Do you have the Smart Map plugin installed by chance?
Brandon Kelly
CC BY-SA 3.0
2014-11-03T11:27:53.260Z
@BrandonKelly I've just run into _exactly_ the same issue, and we have Smart Maps on this site. Disabling that plugin fixes the load time issue.
Joel Bradbury
CC BY-SA 3.0
2014-11-03T15:25:56.447Z
Hey Shane, which version of Smart Map are you running? Some changes have been made recently to alleviate issues like this.
Lindsey D
CC BY-SA 3.0
2014-11-19T18:39:05.620Z
**UPDATE:** Several recent iterations of Smart Map have reduced the dependence on 3rd party services. As of version 2.0.12, the visitor geolocation feature has been made optional, and even disabled by default. For those users who still require geolocation of their website visitors, a subscription to MaxMind is highly recommended (instead of relying on the free, but unstable, FreeGeoIp.net).
Lindsey D
CC BY-SA 3.0
2016-11-12T01:45:13.653Z
Shane, did you ever solve your issue? Others might be helped if you can update us on your solution.
Simon East
<performance>
Huge Latency In Pre-prod Environment
# Huge Latency In Pre-prod Environment

(Asked by: username_0 on 2014-07-16)

Hello Craft community,

My team and I have built a site for a client and it looks great. The site runs just fine in my developers local environment and we're all very happy. I have the site now set up on my preproduction Red Hat environment and when I access it there is about 30 seconds of latency, every single time. I cannot figure out where this latency happens, perhaps there is a configuration somewhere I am missing?

I can access images, js files, etc. without any issue - but once I hit a php file in the Craft environment, things are super slow.

I tried turning the devMode flag to false in the general configurations and that didn't seem to help.

This has nothing to do with my browser - I've tried a straight CURL to the URL and I see the same amount of lag. Perhaps there's some server-side caching I need to enable? Like I said - this is not just with my site, it was slow during the install as well as when I just access the admin tool to look at/change configurations. Please help!

**Tags:** performance

> **Comments:**
> **username_1**: Have you any api calls that have hit their rate limit... that caught me out twice!  
> **username_0**: Sean - what kind of API calls?  I am just trying to hit my home page of my site of the landing page, and nothing.  Even if I was hitting an API - I'm no where near a rate limit, I'm the only one hitting it! :)  
> **username_2**: Depends on if you are using PHP FPM, recently had an issue with nginx as a proxy to Apache but it was a PHP specific error, trying a PHP info page as well as a static html page and isolate if it's PHP or the Apache/nginx server.  
> **username_3**: I think Sean meant external APIs like Twitter, Instagram, etc. Check that permissions are correct on your preprod server. Enable devMode, how many queries is the page doing? Do you have open basedir restrictions in your php config?  
> **username_4**: @ShaneKaszyca Do you have the Smart Map plugin installed by chance?  
> **username_5**: @BrandonKelly I've just run into _exactly_ the same issue, and we have Smart Maps on this site. Disabling that plugin fixes the load time issue.  
> **username_6**: Hey Shane, which version of Smart Map are you running? Some changes have been made recently to alleviate issues like this.  
> **username_6**: **UPDATE:** Several recent iterations of Smart Map have reduced the dependence on 3rd party services. As of version 2.0.12, the visitor geolocation feature has been made optional, and even disabled by default. For those users who still require geolocation of their website visitors, a subscription to MaxMind is highly recommended (instead of relying on the free, but unstable, FreeGeoIp.net).  
> **username_7**: Shane, did you ever solve your issue? Others might be helped if you can update us on your solution.  

---

## 2 answers

### Answer by username_8 on 2014-07-16. Score: 6 | Accepted answer

Could you upload a "non Craft" php-file, restart the server, and check if this file also loads slow? If it does, the server has probably some kind of an issue, and you should contact your hoster.

**If not, try:**

* deleting the `/craft/app/storage/runtime` directory.
* bumping up the php [`memory_limit`](http://www.php.net/manual/en/ini.core.php#ini.memory-limit).
* contacting P&T support from the Dashboard widget. They love environmental issues (So I've heard... \*cough\*).

> **Comments:**
> **username_0**: I did load an info.php to dump my environment information and it loads immediately without any issue from both the browser as well as a curl statement.  I'll look into the other options.  Right now my php memory is set to 128 MB - which I've read in the requirements is enough.  I removed the runtime directory and that did not help either.  I turned on slow query logging to see if anything would spit out - nothing shows up.  Slow query threshold at 2 seconds.  
> **username_8**: Ok, it looks more and more like an environmental issues. You should contact P&T now ;)  

---

### Answer by username_5 on 2014-11-03. Score: 8

I've just ran into this myself this morning. It looks to be related to the SmartMaps plugin doing an IP > Geo lookup using an external service.

Specifically it looks like it's using this api :<https://geoip.maxmind.com/geoip/v2.0/> which is hanging.

Disabling the plugin fixed my loading issues.

> **Comments:**
> **username_1**: I also had CURL errors, not just related to SmartMap, but that did show up as one of the errors.  
> **username_6**: Hey Joel and Sean, which version of Smart Map are you running? Some changes have been made recently to alleviate issues like this.  
> **username_1**: I'm using 2.0.8  
> **username_6**: **UPDATE:** Several recent iterations of Smart Map have reduced the dependence on 3rd party services. As of version 2.0.12, the visitor geolocation feature has been made optional, and even disabled by default. For those users who still require geolocation of their website visitors, a subscription to MaxMind is highly recommended (instead of relying on the free, but unstable, FreeGeoIp.net).  

---

