End of the week sadness

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.
width=578

Broodwar

Argh. I just wanted to get my frustration out with some Broodwar… Guess I’ll go home unsatisfied. *shrug*

Windows Update – Error number: 0x8DDD0018

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

When attempting to run Windows Update the following message appears: ‘Error number: 0x8DDD0018.’ This message states that the Automatic Updates, BITS, and Event Log services must be started, but they are all started and WinUpdates still fails.

Run this command from a command prompt:

regsvr32.exe wuaueng.dll

Windows Live Messenger Error code: 80072745

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

We can’t sign you in to Windows Live Messenger  Error code: 80072745

I’ve had this error every time I’ve installed Windows Live Messenger on my Windows 7 Pro 32bit system.

I’ve been through many different blogs, including MSDN, to try to resolve this with no luck.

The only resolution I have found was to add the following entries into my HOSTS file.  (C:windowssystem32driversetcHOSTS)

65.54.239.80 messenger.hotmail.com
65.54.239.80 dp.msnmessenger.akadns.net

nginx 502 bad gateway

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

[note]May 22, 2012: I have since moved away from TCP backend to Unix sockets. This has resolved my sporadic 502’s and gave better performance.
In /etc/rc.local I removed the -a and -p arguments and replaced with -b /tmp/php.socket and in my nginx configuration, I set fastcgi_pass unix:/tmp/php.socket;
[/note]

I discovered I needed a manager for fastcgi so I decided on daemontools instead of php-fpm.

Instructions for setting this up are here:  http://wiki.linuxwall.info/doku.php/en:ressources:dossiers:nginx:daemontools_spawnfcgi

I also had to modify my /etc/nginx/fastcgi_php file to reflect that I am now working on TCP port php5-cgi instead of a Unix socket.

location ~ .php$ {
    include /etc/nginx/fastcgi_params;

    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    if (-f $request_filename) {
-        fastcgi_pass unix:/var/run/www/php.sock;
+        fastcgi_pass 127.0.0.1:9000;
    }
}

This is my run command for the spawn-fcgi service:

root@node1:~# cat /etc/sv/spawn-fcgi/run
#! /bin/sh
exec /usr/bin/spawn-fcgi -n -a 127.0.0.1 -p 9000 -u www-data -g www-data -C 5 /usr/bin/php5-cgi

Now, no more intermittent 502 Bad Gateways. This isn’t nginx’s fault, it’s just PHP crashing and there isn’t a monitor to restart the process. That has been resolved now.

nginx error – 413 Request Entity Too Large

This content is 7 years old. Technology changes with time. Keep that in mind as you read this article.

I was getting an error when trying to upload and attach images larger than 2MB via WordPress.

I discovered that nginx has a configuration setting called client_max_body_size that is default set to 1M.

To change this, I altered my nginx vhost configuration and added the following line:

server {
    server_name techish.net www.techish.net;
    root /var/www/techish.net;
    include /etc/nginx/fastcgi_php;
    client_max_body_size 5M;
    location / {
        index index.php;
        if (!-e $request_filename) {
            rewrite ^(.*)$  /index.php last;
        }
    }
}

This should suffice for most of my image uploading needs.  However, if you have large uploads you perform to your server through nginx, you may need to increase that!

Reload nginx

/etc/init.d/nginx reload

Here’s nginx configuration’s HttpCoreModule documentation on this configuration value:

client_max_body_size

syntax: client_max_body_size size
default: client_max_body_size 1m
context: http, server, location

Directive assigns the maximum accepted body size of client request, indicated by the line Content-Length in the header of request.

If size is greater the given one, then the client gets the error “Request Entity Too Large” (413).

It is necessary to keep in mind that the browsers do not know how to correctly show this error.

Note: You’ll need to match your PHP value also.

/etc/php5/cgi/php.ini

upload_max_filesize = 5M

Restart php-cgi

/etc/init.d/php-cgi restart