Timeout when editing a place from frontend

This topic contains 2 replies, has 2 voices, and was last updated by  Paolo 9 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #62223

    asbtech
    Expired Member
    Post count: 2

    Wordpress: 4.3.1
    GeoDirectory: 1.5.5
    GeoDirectory CPT: 1.2.3
    GeoDirectory Location Manager: 1.4.2
    Easy WP SMTP: 1.2.1
    nginx: 1.2.1-2.2+wheezy3
    PHP5-FPM: 5.4.45-0+deb7u2

    When I edit a place from the frontend, the listing-preview page timeouts and throws a 500 error. If I edit such place from the backend, it just works fine.

    This is the nginx log entry when this happens:

    2015/12/02 09:47:44 [error] 1958#0: *90 upstream timed out (110: Connection timed out) while reading upstream, client: 192.168.20.55, server: *hidden*, request: “POST /listing-preview/ HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php5-fpm.sock:”, host: “*”, referrer: “https://*hidden*/add-listing/?pid=15”

    #62242

    asbtech
    Expired Member
    Post count: 2

    Solved by myself after looking a bit around.

    The PHP’s slow log was telling the script was stopping at line 1032 of wp-content/plugins/geodirectory/geodirectory_template_actions.php, in the getimagesize() function.

    I have added a line before such command:

    error_log("Image is: ".$image, 3, "/tmp/wordpress.log");

    and ran the listing update. Then I took a look inside /tmp/wordpress.log:

    Image is: https://myfqdn/wp-content/uploads/2015/12/temp_1/aerialview1.jpg

    and well… doing a:

    curl https://myfqdn/wp-content/uploads/2015/12/temp_1/aerialview1.jpg

    from the very own server got stuck.

    TL;DR: the myfqdn IP address was resolving to the external, non-reachable IP address because of DNS resolution 😛 Put myfqn as 127.0.0.1 in /etc/hosts and voilà!

    #62293

    Paolo
    Site Admin
    Post count: 31211

    Awesome, thanks for sharing! Hopefully this will be useful for someone else too 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount