NGINX error log question

TPerry

Well-known member
I'm just now getting this error in my error.log. It started after installing the latest sitemap add on.
Code:
2013/04/10 14:02:03 [warn] 14553#0: *1363 using uninitialized "xf_cache_key" variable, client: 157.56.92.161, server: twowheeldemon.com, request: "GET /robots.txt HTTP/1.1", host: "twowheeldemon.com"

I have this set in my domains nginx vhost config file
Code:
set $xf_cache_key "$host$cookie_xf_session$cookie_xf_fbUid$request_method$uri$args";
        fastcgi_cache  twowheel;
        fastcgi_cache_key  $xf_cache_key;
        add_header  XF-Cache-Status $upstream_cache_status;

and this set in config.php for XenForo
Code:
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';

Any ideas on why I keep getting the error?

I may have figured it out - but if one of the local nginx guru's would confirm I would appreciate it.
I had to change the vhost config file from the above example to
Code:
 fastcgi_cache  twowheel;
        fastcgi_cache_key  $xf_cache_key;
        add_header  XF-Cache-Status $upstream_cache_status;
set $xf_cache_key "$host$cookie_xf_session$cookie_xf_fbUid$request_method$uri$args";
and I am no longer getting the error.
 
Someone sent me a PM about this thread. :p
(So you're not alone in getting this)

While I'm not a nginx expert .... Looking at your new configuration .... It seems fine to me.
 
Someone sent me a PM about this thread. :p
(So you're not alone in getting this)

While I'm not a nginx expert .... Looking at your new configuration .... It seems fine to me.
:D It's been rocking along since I posted the original thread with no more problems. Thanks for checking it out.
I got to thinking tho' (after looking at my Munin stats and seeing that at max my system would use 1.4GB Ram on a 1GB VPS) that I needed to make a few changes. Since I don't get that many users I disabled the additional cache features in XenForo's config.php, disabled that entry and then contacted my VPS provided and bumped up to 2GB memory. Now I have gotten it to a more reasonable level and still have some growth room.
 
Code:
using uninitialized "xf_cache_key" variable

That would appear to have been your problem You were using that variable before it was initialized by fastcgi_cache_key.

That's just a my best guess. Nobody PM'd me on it.
 
What, you had a resource on Debian server setup and made me muddle through it by myself... how COULD you do that to such a important person as myself! :p
Was fairly sure I had posted a link in your direction at one time or another. :X3:

It only covers Apache though.
http://xenforo.com/community/resources/debian-server-setup.952/

I was thinking of making a Debian nginx guide. Big point on making those guides though; is to explain it (word it) in such away that even a Windows noob, who doesn't even know there is a such thing as Linux, could still follow and understand it (or at least blindly follow it without understanding).
 
Was fairly sure I had posted a link in your direction at one time or another. :X3:

I'm pretty sure you did... I'm just going for my yankaward2.gif . Found that Deb is easier to deal with than Ubuntu on a base OS install setup. After finally getting my head wrapped around nginx there is NO way I could go back to Apache (unless I had no choice - like on a shared host).
 
Back
Top Bottom