Hello!

I have an issue that I cannot get image styles (in my case, thumbnails) of uploaded pictures to work with Storage API (on S3) before running Cron.

In the image styles I set storage class for styled images to a class that has following properties

  • Initial Container: Filesystem
  • Container: Filesystem
  • Serve by redirection: No
  • Serve source: No
  • Serve as data URI: No

In the content type i configured the field to use a class with following properties

  • Initial Container: Amazon S3
  • Container: Amazon S3
  • Serve by redirection: No
  • Serve source: No
  • Serve as data URI: No

I use the lighttpd (with mod_rewrite for clean urls) with php5 and sqlite on EC2

Before i run cron, the thumbnail does not show, as soon as i run cron, the thumbnail is there.
What can i do or configure to make thumbnails work as soon as the image is uploaded?

Any help is appreciated! :)

Thanks,
Boris

Files: 
CommentFileSizeAuthor
#2 stacktrace.PNG115.99 KBBorisBarowski
#2 link.PNG20.53 KBBorisBarowski

Comments

I'm surprised it works at all on sqlite!

Can you paste a firebug http trace of what happens when you upload an image?

StatusFileSize
new20.53 KB
new115.99 KB

Hi, thanks for the quick reply!

For quick testing (proof of concept of the module) only, wouldn't use sqlite in prod.

Attached the stack trace, with 500 internal server error expanded.
Also included a screenshot of the page the error refers to (didn't see this before)
PDOexception -> sqlite related?

Yeah the locking in class StorageLock in storage.module is mysql specific.

At one point I had written a patch that would use a different sql command for postgres and do no locking for sqlite. Unfortunately I accidentally deleted the code before I committed it. ;-(

You could just replace

<?php
$success
= db_query('SELECT GET_LOCK(:name, 86400)', array(':name' => $this->id))
      ->
fetchField();
?>

with

<?php
$success
= TRUE;
?>

the locking would not be necessary in a typical sqlite setup.

Interested that it is working otherwise on sqlite!!

Yup, that made it work.

Any chance a fix makes it into one of the next releases? As otherwise it works perfectly on sqlite, no other issues found! (but only tested fs/s3, not the other services)

So officially MySQL is the only supported/tested DB for now? I can update the documentation if you want, as I didn't see any reference to this.

Thanks again for the quick solution, was looking all over the place if I missed some config :)

Yeah - please update docs. I'll fix this for the next release.