Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

February 03 2010

maracuja
15:19

January 06 2010

maracuja
11:27

php curl s3 tarzan select/poll returning error

ok for the last couple of days i've been blighted by an odd error that is affecting the staging server of one of my sites. i've been using the awesome AWS framework Tarzan to send files to S3 and everything was running fine up to christmas. i left for the christmas break and had a great time etc, but came back and the site no longer worked.

after much searching and debugging i finally tracked the problem down to curl producing this error "select/poll returning error". not tremendously helpful and no response seemed to be coming back either which really puzzled me*. thing is the code worked absolutely fine on my local machine.

anyway fruitless google searches, i decided to download the latest version of tarzan and just test a file upload in isolation on the staging server. what a good idea THAT was. it immediately gave me a skewed time error, which as it turns out, was the problem causing the uploads to fail.

the system time on my staging server had become 15 minutes out of sync with amazon's server time. as soon as i update my server's time to The Actual Time™ my uploads started working again.

Now I don't my server to lose track of time again so I did a little research found out about a neat wee app that keeps time for you called NTP and here's how you install it ...

$ sudo yum install ntp
$ sudo /usr/sbin/ntpdate pool.ntp.org
$ sudo /sbin/service ntpd start

i'm going to go and relax with a coffee now

* when i use words like puzzled or tricky, what i mean is i was screaming, shouting and throwing things across the room in a primeval rage

October 16 2009

maracuja
09:21

October 05 2009

maracuja
10:23

October 01 2009

maracuja
13:34

September 15 2009

maracuja
16:52

July 08 2009

maracuja
09:17

May 04 2009

maracuja
21:04

May 03 2009

maracuja
12:59

April 21 2009

maracuja
20:57

April 20 2009

maracuja
22:23
maracuja
18:02
maracuja
18:01
maracuja
18:01

April 19 2009

maracuja
22:33
maracuja
22:30

April 17 2009

maracuja
09:26

March 29 2009

maracuja
17:05
maracuja
17:04
Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.