Saturday 30 January 2010

Processing photos

This morning I had breakfast, then went out in the garden with L to see how frozen the pond was. It seemed to have a few flecks of snow on it, and the ice was about 1cm thick, which is quite thick considering the temperature hasn't been below zero for probably a couple of weeks now.

I calibrated my monitor, wrote up yesterday's blog pot, and did some vacuuming.

I started processing more photos from Acton Scott, which we visited on the fourth day of our Shropshire holiday, back in July.

Mike and Nicky came to visit, and bought their granddaughter Scarlet with them, though I didn't see much of them as I was too busy processing my photos.

After lunch I carried on processing photos, Mike and Nicky went home about 3.30pm.

I finished processing the Acton Scott image about 4.30pm, then checked the metadata and renamed the images.

In the evening I watched an episode of Power Rangers with L, then started uploading the Acton Scot photos to my photo website, and also uploaded a photo to various photo sharing websites.

After uploading one image (not larger than the other images or anything, just a normal image), I found that I couldn't access my website and was getting a 504 Getway timeout error. I tried my pog website, but that seemed to be working okay. So I logged into the webserver and looked at the error logs for my photo website. The error log just said it (i.e. nginx) wasn't receiving any response from upstream (i.e. php).

I checked what processing were running, and php was running (well, obviously, since my other website that runs on the same server with the same php instance was working okay). I tested my photo website again, but nope, still 504.

I restarted php using the CentOS spawn-fcgi init script, which said that it failed in closing down the current PHP processes, but started the new ones successfully. I checked what processes I was running, and only the new php processes showed up, so I guess that it did close down the old PHP processes, even though it said that it had failed. That it said that it had failed does indicate that something had gone wrong with the old PHP processes though.

It's strange how my pog website still worked though. The only thing I can think of is that that one or two of the php processes were dead (I had one PHP parent process with 3 child processes running), and when I tried to access my pog website my request luckily got handled by the working PHP process, while whenever I tried to access my photo website, my request unluckily got handled by one the broken PHP processes.

Anyway, after restarting php fcgi, I could access my photo website again. I checked the last image I uploaded had uploaded okay, and it had. I uploaded another image, but got a blank screen. I thought that php had broken again, but I pressed enter in the url bar, and the page reloaded okay. I checked the image had uploaded okay, and it hadn't, there wasn't even a record in the database for it (the image metadata is added to the database before the image is moved and resized).

I tried again, and this time the image uploaded okay.

Food
Breakfast: Orange Marmalade Toast Sandwich; Cup o' Tea.
Lunch: Mature Cheddar Cheese Sandwich made with fresh Bakery Bread; 2x Clementines; Slice of fresh Bakery Bread with Strawberry Jam; Chocolate Snowball; Cup o' Tea.
Dinner: Toad in the Hole; Mustard; Gravy; Potatoes; Green Beans; Carrots. Pudding was a Belgian Chocolate Truffle. Coffee.

No comments: