Hello, i used the advagg Module since Years and i Love it..Hey´aar the Holy Crall ;D
but i switch my server now on nginx and i have not idea why is all working fine, but i get a 500 internal error.
i can build it and all, but i become a red warning on D6 and D7 install i got this msg..anyone know what i have to do?

stdClass Object (
[request] => GET /sites/default/files/advagg_css/css_missing19143605941377777139_0.css HTTP/1.0
Host: example.de
User-Agent: Drupal (+http://drupal.org/)
Connection: close

[data] =>
500 Internal Server Error


500 Internal Server Error


nginx


[protocol] => HTTP/1.1
[status_message] => Internal Server Error
[headers] => Array (
[Server] => nginx
[Content-Type] => text/html
[Content-Length] => 186
[Accept-Ranges] => bytes
[Date] => Thu, 29 Aug 2013 11:52:19 GMT
[X-Varnish] => 1832124247
[Age] => 0
[Via] => 1.1 varnish
[Connection] => close
[X-Varnish-Cache] => MISS
)
[error] => Internal Server Error
[code] => 500
[timer] => Array (
[count] => 1
[time] => 2.09
)
)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eule’s picture

error log says:
2013/08/29 13:58:40 [error] 5581#0: *2379 could not find named location "@drupal", client: 1xx.x1.xx.1xx, server: example.de, request: "GET /sites/default/files/advagg_css/css_missing16140590541377777520_0.css HTTP/1.1", host: "example.de"

i do all the thing in the readme described.

Peter Bowey’s picture

@eule, a Nginx "500 internal error" is very indicative of a Nginx configuration issue with nginx.conf - or other associated nginx *.conf files.

You may need to setup Nginx with debugging logs to find the actual reason why this error occurs for you. See: Nginx Debugging

Adding a Nginx error_log $filename debug; will enable debug level logging to the error log -- this will give you a lot of details of nginx's internal status at the time of the error. If Nginx was compiled with --with-debug (which several distros do by default) it'll give even more.

Please view: error_log /var/log/nginx/error.log;

Be warned that the Nginx "debug" level can generate a lot of output data, to the point that you may want to watch your disk space...if used for a long period.

If you are using Nginx with PHP-FPM, also be sure to [also] set PHP display_errors = on, then check your PHP logs. The problem could also be with 'php-fpm' as used by Nginx.

Nginx just gives back exactly what your backend returns. (php)

eule’s picture

Hello @Peter Bowey

i setup and debug over the http block with error_log /bla/log/blaadebug.log debug;
..this still works...but what do you think on witch level i have to debug? http??

this is a piece of output...but it tells me nothing

2013/08/29 18:03:57 [notice] 5793#0: gracefully shutting down
2013/08/29 18:03:57 [notice] 5792#0: gracefully shutting down
2013/08/29 18:03:57 [debug] 5793#0: setproctitle: "nginx: worker process is shutting down"
2013/08/29 18:03:57 [debug] 5792#0: setproctitle: "nginx: worker process is shutting down"
2013/08/29 18:03:57 [debug] 5793#0: close listening 0.0.0.0:8080 #14
2013/08/29 18:03:57 [debug] 5792#0: close listening 0.0.0.0:8080 #14
2013/08/29 18:03:57 [debug] 5794#0: timer delta: 100
2013/08/29 18:03:57 [debug] 5794#0: posted events 0000000000000000
2013/08/29 18:03:57 [notice] 5792#0: exiting
2013/08/29 18:03:57 [notice] 5794#0: gracefully shutting down
2013/08/29 18:03:57 [debug] 5794#0: setproctitle: "nginx: worker process is shutting down"
2013/08/29 18:03:57 [debug] 5792#0: flush files
2013/08/29 18:03:57 [debug] 5794#0: close listening 0.0.0.0:8080 #14
2013/08/29 18:03:57 [notice] 5793#0: exiting
2013/08/29 18:03:57 [debug] 5793#0: flush files
2013/08/29 18:03:57 [notice] 5794#0: exiting
2013/08/29 18:03:57 [debug] 5794#0: flush files
2013/08/29 18:03:57 [debug] 5792#0: run cleanup: 0000000001991D18
2013/08/29 18:03:57 [debug] 5793#0: run cleanup: 0000000001991D18
2013/08/29 18:03:57 [debug] 5792#0: cleanup resolver
2013/08/29 18:03:57 [debug] 5792#0: run cleanup: 000000000195DB30
2013/08/29 18:03:57 [debug] 5793#0: cleanup resolver
2013/08/29 18:03:57 [debug] 5794#0: run cleanup: 0000000001991D18
2013/08/29 18:03:57 [debug] 5793#0: run cleanup: 000000000195DB30
2013/08/29 18:03:57 [debug] 5792#0: open file cache cleanup
2013/08/29 18:03:57 [debug] 5793#0: open file cache cleanup
2013/08/29 18:03:57 [debug] 5792#0: run cleanup: 0000000001A15FD0
2013/08/29 18:03:57 [debug] 5793#0: run cleanup: 0000000001A15FD0
2013/08/29 18:03:57 [debug] 5794#0: cleanup resolver
2013/08/29 18:03:57 [debug] 5792#0: free: 00000000019A83F0
2013/08/29 18:03:57 [debug] 5794#0: run cleanup: 000000000195DB30
2013/08/29 18:03:57 [debug] 5793#0: free: 00000000019A83F0
2013/08/29 18:03:57 [debug] 5794#0: open file cache cleanup
2013/08/29 18:03:57 [debug] 5794#0: run cleanup: 0000000001A15FD0
2013/08/29 18:03:57 [debug] 5794#0: free: 00000000019A83F0
2013/08/29 18:03:57 [debug] 5793#0: free: 0000000001A45DA0
2013/08/29 18:03:57 [debug] 5792#0: free: 0000000001A45DA0
2013/08/29 18:03:57 [debug] 5793#0: free: 0000000001950580
2013/08/29 18:03:57 [debug] 5794#0: free: 0000000001A45DA0
2013/08/29 18:03:57 [debug] 5792#0: free: 0000000001950580
2013/08/29 18:03:57 [debug] 5794#0: free: 0000000001950580
2013/08/29 18:03:57 [debug] 5793#0: free: 000000000195B000
2013/08/29 18:03:57 [debug] 5793#0: free: 0000000001959000
2013/08/29 18:03:57 [debug] 5792#0: free: 000000000195B000
2013/08/29 18:03:57 [debug] 5794#0: free: 000000000195B000
2013/08/29 18:03:57 [debug] 5793#0: free: 00000000019C4000
2013/08/29 18:03:57 [debug] 5793#0: free: 000000000194E560
2013/08/29 18:03:57 [debug] 5793#0: free: 000000000194D4A0
2013/08/29 18:03:57 [debug] 5792#0: free: 0000000001959000
2013/08/29 18:03:57 [debug] 5794#0: free: 0000000001959000
2013/08/29 18:03:57 [debug] 5793#0: free: 000000000194C3E0
2013/08/29 18:03:57 [debug] 5792#0: free: 00000000019C4000
2013/08/29 18:03:57 [debug] 5794#0: free: 00000000019C4000
2013/08/29 18:03:57 [debug] 5792#0: free: 000000000194E560
2013/08/29 18:03:57 [debug] 5794#0: free: 000000000194E560
2013/08/29 18:03:57 [debug] 5793#0: free: 000000000194B320
2013/08/29 18:03:57 [debug] 5793#0: free: 0000000001A14500, unused: 0
2013/08/29 18:03:57 [debug] 5792#0: free: 000000000194D4A0
2013/08/29 18:03:57 [debug] 5794#0: free: 000000000194D4A0
2013/08/29 18:03:57 [debug] 5793#0: free: 00000000019BB030, unused: 0
2013/08/29 18:03:57 [debug] 5793#0: free: 000000000195C010, unused: 0
2013/08/29 18:03:57 [debug] 5792#0: free: 000000000194C3E0
2013/08/29 18:03:57 [debug] 5793#0: free: 0000000001954E00, unused: 0
2013/08/29 18:03:57 [debug] 5794#0: free: 000000000194C3E0
2013/08/29 18:03:57 [debug] 5793#0: free: 00000000019BF040, unused: 0

Peter Bowey’s picture

Hi @eule, that log only shows Nginx shutting down, but not the error that caused this!

It will be unlikely that 'advagg' is causing this event, but it is likely that nginx or php is faulting due to a bad configuration / setup for Nginx. A Nginx 500 Internal Server Error is basically saying that Nginx is being asked to do something impossible in the context of serving data!

eule’s picture

you are in a irc chan? i can paste my nginx.conf / someone said its nothing unnormal on it.

http://pastebin.com/SnvQQyYp - nginx.conf
http://pastebin.com/s0qGALVu - site enabled ..here a D7 install

Peter Bowey’s picture

Hi @eule,

First make sure that static files (eg. an image, html file, etc.) work with Nginx.

If this doesn't work, then your basic nginx setup has a problem. Check your nginx error log , note you're only logging critical errors right now, you may want to setup some more logging.

If this does work, the problem is in your PHP or php-fpm configuration, or perhaps the PHP<->nginx connection. Check the nginx logfile and the php-fpm log-files.

Start with a basic Drupal Nginx configuration and add your settings one by one.

eule’s picture

i found a lot of basic configs...and this is in the official wiki..fastcgi_pass unix:/tmp/phpfpm.sock;
can´t never work, works with fastcgi_pass unix:/tmp/php-fpm.sock; :/ so i´m not sure @all

Peter Bowey’s picture

Hi @eule

Via your pasted Nginx settings:

http://pastebin.com/SnvQQyYp - nginx.conf
http://pastebin.com/s0qGALVu - site enabled ..here a D7 install

Those 'pastebin' Nginx settings look like copies from various old (and likely buggy) setups of various user's using Nginx.

I suggest a fresh insight into using Nginx with Drupal (6 or 7), in particular see: https://github.com/omega8cc/nginx-for-drupal/tree/master/aegir/conf.

When it comes to using Nginx, you need to be confident of the settings used. I have been using Nginx with D6 and D7 for some time, and does take time to get it right (nginx). I have seen several settings / changes I have made cause the "500 Internal Server Error'. The most common were 'incorrect' settings given to Nginx itself.

eule’s picture

I will dig in to it. Thx for your help and spoke to the support request. I´m new to all this server stuff and like to see my site is running ;-)

Peter Bowey’s picture

Hi @eule,

Your 'pastebin' configuration for Nginx shows you are using:

server {
  listen 8080;
  server_name www.example.de;

and then:

fastcgi_pass unix:/tmp/php-fpm.sock;

That does not make sense, unless you are using a Nginx proxy setup to 'apache' serving the PHP rather than 'php-fpm'.

Please explain your setup.

The default nginx 'php-fpm' would normally use the default nginx 'listen' on port '80' - not '8080'. The use of '8080' is normally used to let 'apache' serve php - and not the supplied nginx 'php-fpm' engine.

eule’s picture

8080 because varnish runs of 80, that baracuda stuff looks good, but i thing i´m too new to understand this all, and last but not least my english is not the best

eule’s picture

Priority: Major » Normal

Hi, after a lot of asking like on the drupal irc chan end getting nuthin and no answer. i digg and found this:

    ###
    ### advagg_css and advagg_js support
    ###
    location ~* files/advagg_(?:css|js)/ {
      access_log off;
      expires    max;
      add_header ETag "";
      add_header Cache-Control "max-age=290304000, no-transform, public";
      try_files  $uri <strong>@drupal</strong>;
    }

on my environment i have location set to @rewrite ,,so i change this and get it maybe working? first i get no errors more in my d6 and d7 install, will show now whats up in the logs..thanks Peter Bowey for the conversation.

mikeytown2’s picture

Status: Active » Fixed
FileSize
327 bytes

Going to mark this as fixed. Following patch has been committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

typo