Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-03T13:12:56.900Z
Answers.Text: I also had CURL errors, not just related to SmartMap, but that did show up as one of the errors.
Answers.UserDisplayName: Seán O'Grady
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-03T15:24:58.407Z
Answers.Text: Hey Joel and Sean, which version of Smart Map are you running? Some changes have been made recently to alleviate issues like this.
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-03T19:37:33.707Z
Answers.Text: I'm using 2.0.8
Answers.UserDisplayName: Seán O'Grady
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-19T18:39:32.130Z
Answers.Text: **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).
Answers.UserDisplayName: Lindsey D
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-03T11:33:51.390Z
Answers.LastActivityDate: 2014-11-03T11:33:51.390Z
Answers.UserDisplayName: Joel Bradbury
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-17T19:47:44.383Z
Answers.Text: 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.
Answers.UserDisplayName: Shane Kaszyca
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-17T20:02:03.253Z
Answers.Text: Ok, it looks more and more like an environmental issues. You should contact P&T now ;)
Answers.UserDisplayName: Victor
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-16T12:48:43.917Z
Answers.LastActivityDate: 2014-07-16T12:48:43.917Z
Answers.UserDisplayName: Victor
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-16T13:06:37.663Z
Comments.Text: Have you any api calls that have hit their rate limit... that caught me out twice!
Comments.UserDisplayName: Seán O'Grady
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-17T19:48:48.237Z
Comments.Text: 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! :)
Comments.UserDisplayName: Shane Kaszyca
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-03T03:46:35.163Z
Comments.Text: 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.
Comments.UserDisplayName: Jason McCallister
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-03T07:09:27.527Z
Comments.Text: 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?
Comments.UserDisplayName: André Elvan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-03T11:17:55.087Z
Comments.Text: @ShaneKaszyca Do you have the Smart Map plugin installed by chance?
Comments.UserDisplayName: Brandon Kelly
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-03T11:27:53.260Z
Comments.Text: @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.
Comments.UserDisplayName: Joel Bradbury
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-03T15:25:56.447Z
Comments.Text: Hey Shane, which version of Smart Map are you running? Some changes have been made recently to alleviate issues like this.
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-11-19T18:39:05.620Z
Comments.Text: **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).
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-12T01:45:13.653Z
Comments.Text: Shane, did you ever solve your issue? Others might be helped if you can update us on your solution.
Comments.UserDisplayName: Simon East
Tags: <performance>
Title: Huge Latency In Pre-prod Environment
ThreadText: # 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**: @username_0 Do you have the Smart Map plugin installed by chance?  
  > **username_5**: @username_4 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 username_0, 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**: username_0, 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 username_5 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).  
  
  ---
  
  