Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Apr 09, 2010 11:48 pm 
Offline
Junior Member

Joined: Sat Feb 27, 2010 12:43 am
Posts: 23
After installing Nginx and stopping apache services, I always get the following error when sending out emails using my wordpress plugin. I'm using postfix for email server. How can I fix it??

504 Gateway = Time-out nginx/0.5.33


Top
   
 Post subject:
PostPosted: Sat Apr 10, 2010 6:48 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Gateway timeout means that the PHP back end doesn't respond to the nginx server, what are you using to power PHP?

Also..nginx0.5.33...that's so old. Upgrade to the 0.7 branch at least.


Top
   
 Post subject:
PostPosted: Mon Apr 12, 2010 1:10 am 
Offline
Junior Member

Joined: Sat Feb 27, 2010 12:43 am
Posts: 23
I have just upgraded to the latest nginx. However I'm still getting the same error. I'm using php fastcgi. How can I make it work?


Top
   
 Post subject:
PostPosted: Mon Apr 12, 2010 1:17 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Can you post your nginx configuration?


Top
   
 Post subject:
PostPosted: Mon Apr 12, 2010 1:59 am 
Offline
Junior Member

Joined: Sat Feb 27, 2010 12:43 am
Posts: 23
I found this in the error.log. It might help:

Code:
www.vectordiary.com, request: "GET /feed/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.vectordiary.com"
2010/04/12 05:07:46 [error] 32732#0: *389 FastCGI sent in stderr: "ALERT - script tried to increase memory_limit to 268435456 bytes which is above the allowed value (attacker '125.166.47.106', file '/home/tony/public_html/vectordiary.com/public/wp-content/plugins/wishlist-member/core/PluginMethods.php(111) : eval()'d code(3) : eval()'d code', line 94)" while reading response header from upstream, client: 125.166.47.106, server: www.vectordiary.com, request: "POST /wp-admin/admin.php?page=WishListMember&wl=members&mode=broadcast HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.vectordiary.com", referrer: "http://www.vectordiary.com/wp-admin/admin.php?page=WishListMember&wl=members&mode=broadcast"


Top
   
 Post subject:
PostPosted: Mon Apr 12, 2010 2:04 am 
Offline
Junior Member

Joined: Sat Feb 27, 2010 12:43 am
Posts: 23
Here is my nginx config file:

Code:
user www-data;
worker_processes  1;

error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    access_log  /var/log/nginx/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip  on;

    include /etc/nginx/sites-enabled/*;

}


Code:
server {
    listen       0.0.0.0:80;
    server_name   www.vectordiary.com vectordiary.com;
    root   /home/tony/public_html/vectordiary.com/public;
    index  index.php;

    charset utf-8;

    location / {
#       gzip_static on;

         # if the requested file exists, return it immediately
        if (-f $request_filename) {
                break;
        }

        set $supercache_file '';
        set $supercache_uri $request_uri;

        if ($request_method = POST) {
                set $supercache_uri '';
        }

        # Using pretty permalinks, so bypass the cache for any query string
        if ($query_string) {
                set $supercache_uri '';
        }

        if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" ) {
                set $supercache_uri '';
        }

        # if we haven't bypassed the cache, specify our supercache file
        if ($supercache_uri ~ ^(.+)$) {
                set $supercache_file /wp-content/cache/supercache/$http_host/$1index.html;
        }

        # only rewrite to the supercache file if it actually exists
        if (-f $document_root$supercache_file) {
                rewrite ^(.*)$ $supercache_file break;
        }

        # feedburner
        if ($http_user_agent !~ FeedBurner) {
          #  rewrite ^/comment/feed/ http://feeds.feedburner.com/your-comment-feed last;
            rewrite ^/feed/ http://feeds.feedburner.com/vectordiary last;
        }

        # all other requests go to Wordpress
        if (!-e $request_filename) {
                rewrite . /index.php last;
        }

      location ~ \.php($|/) {
        set  $script     $uri;
        set  $path_info  "";

        fastcgi_pass   localhost:9000;
        fastcgi_read_timeout 300;
        include /etc/nginx/fastcgi_params;

        fastcgi_param  SCRIPT_FILENAME  /home/tony/public_html/vectordiary.com/public/$fastcgi_script_name;
      }

    }
}


Top
   
 Post subject:
PostPosted: Mon Apr 12, 2010 3:43 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
illusime wrote:
I found this in the error.log. It might help:

Code:
www.vectordiary.com, request: "GET /feed/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.vectordiary.com"
2010/04/12 05:07:46 [error] 32732#0: *389 FastCGI sent in stderr: "ALERT - script tried to increase memory_limit to 268435456 bytes which is above the allowed value (attacker '125.166.47.106', file '/home/tony/public_html/vectordiary.com/public/wp-content/plugins/wishlist-member/core/PluginMethods.php(111) : eval()'d code(3) : eval()'d code', line 94)" while reading response header from upstream, client: 125.166.47.106, server: www.vectordiary.com, request: "POST /wp-admin/admin.php?page=WishListMember&wl=members&mode=broadcast HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.vectordiary.com", referrer: "http://www.vectordiary.com/wp-admin/admin.php?page=WishListMember&wl=members&mode=broadcast"


That error means your script is trying to increase PHP's memory limit, try increasing the memory limit in your php.ini

Your nginx conf looks fine.


Top
   
 Post subject:
PostPosted: Mon Apr 12, 2010 5:29 am 
Offline
Junior Member

Joined: Sat Feb 27, 2010 12:43 am
Posts: 23
Thanks. That solved the problem


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group