0

Now that wp-supercache has some built in support for CDNs, I've tried using the CDN Sync Tool to do an initial upload of files to Cloudfront.

But, I'm getting 2 sets of errors when syncing (I'm having to use force upload, as for some reason CDN Sync Tool thinks all my files have been uploaded already).

  1. cURL error: Failed to open/read local data from file/application (26) This error isn't actually preventing the files from being uploaded though

  2. [function.fopen]: failed to open stream: Too many open files in /var/www/xxxxx/wp-content/plugins/cdn-sync-tool/lib/awssdk/lib/requestcore/requestcore.class.php This error does stop files from being uploaded -> S3.

So, the 2nd error occurs after a certain (changeable) number of files have been uploaded, and then affects all remaining uploads.

Any ideas why or what can be done?

[Update]

After updating to version 0.9, am now getting the following errors repeatedly (after about 2000 files have been synced)

Warning: fclose(): supplied argument is not a valid stream resource in [filepath]/lib/awssdk/lib/requestcore/requestcore.class.php on line 276

The stream size for the streaming upload cannot be determined. done

Syncing [2411/4732] img2343435.jpg

Warning: fopen(/var/www/xx/wp-content/uploads/2010/12/mg2343435.jpg) [function.fopen]: failed to open stream: No such file or directory in [filepath]/lib/awssdk/lib/requestcore/requestcore.class.php on line 527

0

What OS you running? As this actually sounds like an AWS php sdk issue. Having a look though their source code shows they don't seem to use fclose and your OS must have a limit on open files.

If you email me at iain.cambridge - at - fubra.com I'll send you a copy of the sdk with a bug fix aswell.

  • If possible, it would be very helpful if you could post that bug fix here (or post it elsewhere and link to there) so others can benefit from it in the future. – Rarst Jan 19 '11 at 17:26
  • @Backie - Ubuntu 9.04. ulimit -a shows that open files is set to the default (1024). I'll increase this to 4096 and see if the error repeats. Any idea about the initial curl error? – anu Jan 20 '11 at 9:49
  • @anu - added fclose to aws sdk copy and be found github.com/icambridge/aws-sdk-for-php also seems that the curl Error is just because the post fields are empty. I have no idea why. – Backie Jan 20 '11 at 10:27
  • Actually seems all that needs done is upgrade the aws-sdk-for-php as the core one has a fix and my fork's fix is redundant. I'll release an updated version of the plugin tomorrow with the new sdk version. – Backie Jan 20 '11 at 18:32
  • @Backie - tested the latest version (0.9b), and still getting multiple upload errors, but a slightly different error message now - I'll update the question with the new error. – anu Jan 21 '11 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.