Tagged nginx

Fixing eventfd() failed error after YUM nginx upgrade

nginx-logo

After running a Nessus scan on my VPS last night, I ran a yum update to fix a few security holes patched in newer software packages. It was pretty late, so I went to sleep after the upgrade, because everything seemed to be working fine. This morning, when I went to log in to this site’s admin dashboard, I discovered that none of my sites were working. Pings were working fine, but a quick check of the nginx error log revealed this:

2011/03/28 15:18:30 [emerg] 2661#0: eventfd() failed (38: Function not implemented)

A quick Google search turned up this forum, which indicated that the problem was related to the fact that the YUM version of nginx 0.8.53 is compiled with the –with-file-aio option, which uses libraries that were apparently not installed on my system. The solution was to re-install nginx by downloading the latest source and compiling it.

Once I did this, I changed the value of the nginx variable in /etc/init.d/nginx from /usr/sbin/nginx to /usr/local/nginx/sbin/nginx (the location of the new executable). Running service nginx restart did the trick, and my sites were back up and running.

502 Bad Gateway with phpMyAdmin and nginx

I recently ran into an issue with phpMyAdmin served via nginx. When I would click on some of the databases on the sidebar in the home phpMyAdmin screen, the main frame would return a 502 Bad Gateway from nginx. The nginx error.log revealed an “upstream sent too big header while reading response header from upstream” error, which led me to this site. By adding the suggested lines into the http {} section of the nginx.conf file, then restarting nginx, I was able to see the table view load correctly in phpMyAdmin. It’s worth noting that I’m using php-cgi, not php-fpm, so the exact directives required may be slightly different if you’re using php-fpm.

WordCamp Boulder 11 a.m. update

I’m attending WordCamp Boulder today, and as of now I’ve seen a couple of sessions. I have to say the Caching talk was quite informative and entertaining, and on a personal note was a source of some working nginx rewrite rules for WP Super Cache. Thanks to vocecommunications.com‘s Chris and Sean for an entertaining and informative talk. The only complaint I have is that the venue, TechStars’ office environment, was way too small for the group that attended. Don’t think that’s anyone’s fault, just the downside of an awesome talk with great attendance.

The second talk I attended focused on design. Some of the interesting notes I took away from that were that talk were to avoid ‘lorem ipsum’ default content, design for mobile by creating scalable CSS, and that designers should know at least HTML and CSS, even if they’re just ‘frontend’ people. The lorem ipsum issue made good sense–if you don’t know what kind of content you’re designing for, it’s likely your design will be generic and not help the content stand out for what it is. It’s worth spending the time to create some sample posts that actually represent the specific content you will be showing on the production site. Along the lines of mobile styling, the design panel agreed that scaling is the best way to address the needs of diverse resolutions. As we add things like smartphones, iPads, etc., the ability to target inidividual browsers becomes cumbersome, and something like http://simplebits.com/, which uses a design that scales quite nicely from iPhone to full desktop resolution, becomes a better choice.

I’ve definitely gotten my $25 worth so far.

neverblog is now running on a Linode VPS

[simage=127,288,y,left,]Speed: sweet, glorious speed. That’s what you should find as you visit this site in the future, now that everything’s been moved over to a Linode Virtual Private Server. After checking out a colleague’s site that loads pretty much instantly, despite beingĀ  a similar WordPress blog, I decided to sign on with Linode and dump my current Dreamhost shared hosting. At the same time, I followed the same colleague’s suggestion to switch my web server from Apache to nginx. If you’re not familiar with nginx, and you’re hosting a site on which you control the web server, nginx is definitely worth a look as an alternative to Apache, since it’s lighter and faster (also, it seems that the program’s author is willing to work with users to improve functionality).

I was pretty happy with my Dreamhost shared hosting for a while, but this site has outgrown the limited resources that I had, and furthermore the actual physical host that Dreamhost had me on was getting quite old (and full o’ data). I tried a Dreamhost PS for the last week, and while it seems to be decently fast (although the preview PS has 2+GB of RAM), I’m a little ticked off by the pricing. When I was looking at the PS, it was listed as $15 a month for 300MB of RAM (not a bad deal). Once I signed up for the trial, however, the total cost was revealed as $15 plus the shared hosting fee I already pay ($10.95 a month). That brought the total to about $26 a month, a lot more than the $20 a month for the Linode VPS with 360MB of RAM. All in all, the last 4-5 hours of moving my sites over has been worth it, and Linode has been tip-top so far. I’ll post more on them as I continue to use their hosting, and post some articles about the configuration I’m running on the VPS.