Do you find anything in the client logs?<br><br><div class="gmail_quote">On Fri, Jun 10, 2011 at 3:20 AM, Alan Zapolsky <span dir="ltr">&lt;<a href="mailto:alan@droptheworld.com">alan@droptheworld.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
<br>
I have a PHP web application that uses Gluster to store its files.<br>
There are a few areas of the application that perform multiple<br>
operations on small to medium size files (such as .jpg and .pdf files)<br>
in quick succession.  My dev environment does not use Gluster and had<br>
no problems - but in production, I am seeing some strange errors and<br>
am wondering if perhaps Gluster could be the cause.<br>
<br>
Example 1: I may perform the following sequence of operations on a<br>
batch of 3,000 photos:<br>
<br>
1. Copy the photo from remote URL to a temp folder<br>
2. Create a unique directory based on that photo_id<br>
3. Move the photo from the temp dir to the new dir<br>
4. Create a medium (1000px), small (250px), and tiny (72px) versions<br>
of the photo and save them to the temp dir.<br>
<br>
Example 2: Turning a PDF to a PNG<br>
<br>
1. Create a PDF document, ranging from a few MB to tens of MB or more.<br>
2. Use Ghostscript to read a specific page and create a temp .png file from it.<br>
3. Use Imagemagick to resize the .png and add a drop shadow.<br>
4. Delete the temp .png file<br>
<br>
In example 1, I am finding that some of the resulting JPG files wind<br>
up being corrupted - when attempting to read the problematic JPGs, I<br>
receive messages such as &quot;bad Huffman code&quot; or &quot;premature end of data<br>
segment&quot;.<br>
<br>
In example 2, I am getting strange errors on step 3 - it sometimes has<br>
a problem finding the file created by step 2.  And then on step 4, I<br>
sometimes get an error that really baffles me - a line of PHP code<br>
such as:<br>
<br>
  if (is_file($file)) unlink($file);<br>
<br>
.. will sometimes produce an error &quot;unlink: no such file or<br>
directory&quot;.  I have no idea how it passes the is_file() check and then<br>
unlink() says it&#39;s not there.<br>
<br>
At this point I&#39;m just wondering if Gluster could be the culprit for<br>
any of this strange behavior, considering the types of operations and<br>
file sizes I&#39;m working with.  I&#39;ve included my Gluster volume info<br>
below.<br>
<br>
Thanks for the help.<br>
<br>
- Alan<br>
<br>
Gluster Volume Info<br>
[alan@file1:10.X.X.X:d1]$ sudo cat info<br>
type=2<br>
count=2<br>
status=1<br>
sub_count=2<br>
version=1<br>
transport-type=0<br>
volume-id=3fc69046-a324-42de-bf8a-e1bd2e6e45ab<br>
brick-0=10.X.X.X:-data-d1<br>
brick-1=10.Y.Y.Y.38:-data-d1<br>
performance.cache-size=1024MB<br>
performance.write-behind-window-size=4MB<br>
performance.io-thread-count=8<br>
[alan@file1:10.X.X.X:d1]$<br>
_______________________________________________<br>
Gluster-users mailing list<br>
<a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
<a href="http://gluster.org/cgi-bin/mailman/listinfo/gluster-users" target="_blank">http://gluster.org/cgi-bin/mailman/listinfo/gluster-users</a><br>
</blockquote></div><br>