Remote Gallery; socket write error

rappzapp

Joined: 2002-12-29
Posts: 1
Posted: Sun, 2002-12-29 12:32

Hello

I use:
Server RedHat 7.3 Gallery 1.3.3
Client (Gallery Remote 1.01b2) and XP Sp1

Gallery works fine but Upload with Remote Gallery gets allways this Failure:

java.net.SocketException: Software caused connection abort: socket write error

1041164720031|TRACE|GalComm2 |Url: /gallery/gallery_remote2.php
1041164720078|ERROR|GalComm2 |java.net.SocketException: Software caused connection abort: socket write error
1041164720078|ERROR|GalComm2 |java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at HTTPClient.HTTPConnection.sendRequest(HTTPConnection.java:2967)
at HTTPClient.HTTPConnection.handleRequest(HTTPConnection.java:2715)
at HTTPClient.HTTPConnection.setupRequest(HTTPConnection.java:2507)
at HTTPClient.HTTPConnection.Post(HTTPConnection.java:1050)
at com.gallery.GalleryRemote.GalleryComm2$GalleryTask.requestResponse(GalleryComm2.java:269)
at com.gallery.GalleryRemote.GalleryComm2$UploadTask.uploadPicture(GalleryComm2.java:416)
at com.gallery.GalleryRemote.GalleryComm2$UploadTask.runTask(GalleryComm2.java:379)
at com.gallery.GalleryRemote.GalleryComm2$GalleryTask.run(GalleryComm2.java:232)
at java.lang.Thread.run(Unknown Source)

1041164720078|INFO |GalComm2 |Error: java.net.SocketException: Software caused connection abort: socket write error

:cry: I don't know where I should have a lock to troubleshoot???

 
Konrad

Joined: 2003-01-05
Posts: 1
Posted: Sun, 2003-01-05 03:20

I had the same problem. I corrected it by editing the PHP.conf file. the "LimitRequestBody" value was too small for the image sizes I was uploading. Check your apache error log and see if any errors are being thrown.

Hope this helps.

 
lundeby

Joined: 2003-01-12
Posts: 2
Posted: Sun, 2003-01-12 03:43
Quote:
I had the same problem. I corrected it by editing the PHP.conf file. the "LimitRequestBody" value was too small for the image sizes I was uploading.

This was a huge help!

BTW, a related error will occur when using the Windows XP Web Publishing Agent with large photos and not using resizing (i.e. "Yes, make them all this size" not checked). It's fixed by the same solution.

The generic wizard error message is also not of much help in diagnosing the problem:

The wizard encounterded a problem while copying the files. A number of things can cause this problem. For example, the Web server might be down, or you might have lost your Internet connection.

 
nickdrums

Joined: 2003-01-05
Posts: 18
Posted: Mon, 2003-01-13 12:06

This sounds like the answer to problems I have been having. Where is the php.conf file? Is it similar to php.ini, i.e. add it to a scipt directory and it gets picked up? Or is it part of the PHP installation set (which my hosting does not give me access to)?

Nick.

 
nickdrums

Joined: 2003-01-05
Posts: 18
Posted: Tue, 2003-01-14 21:30

Hmm ... this is not going well. I have tried adding an upload_max_filesize value to a php.ini file in the main gallery directory, and also checked that the same value is set in the .htaccess file in the same directory.

I also note that uploads via the web interface are fine, suggesting that there is nothing at all wrong with my PHP environment - the file truncation only happens when uploading from GR.

So, it kind of looks like a client thing, rather than a server thing, but there are no error messages in the log, even at level 3.

I'd really appreciate some help on this - GR looks great and I feel like I'm really close, but currently any file over about 25k gets truncated on upload.

Nick.

 
lundeby

Joined: 2003-01-12
Posts: 2
Posted: Wed, 2003-03-19 23:32

It sounds like nickdrums' issue may be something else. However, it's worth answering the details questions anyway. Sorry we're slow but we're big Gallery users and tend not to come about here except when there are issues. BTW, we're back this time because this same issue returned after a SW update undid the fix.

So, here's the specifics for those of us that like to save big photos in our albums:

The files (for RedHat 8.0 anyway):
/etc/php.ini
/etc/httpd/conf.d/php.conf

Suggested parameter values (note I upload 4-Mpixel images & this should be plently good for that):
LimitRequestBody 16777216
memory_limit = 64M

Upload is blocked via all approches when we see this issue. Usually the error messages are not great. I will not blame the high-level SW like Remote Gallery. The error information being sent up from the drivers, system calls and libraries probably is not very good.

So I hope this is useful to other folks.

 
freerk55

Joined: 2003-05-09
Posts: 7
Posted: Sun, 2003-05-18 12:28

I had to change the LimitRequestBody to 500000000 in the httpd.conf file. (mine is in /usr/local/apache2/conf)
with the given number in your example it stuck on uploading more than 3 files.
memory_limit = 64M was not accepted in this file.
I had to put it in php.ini

But still the upload is slow. When I follow the process in the tmp directory (where the files are uploaded to first) then it takes first quite a while (2 minutes) before files appear in this directory.
When this all is done, quite fast the files also appear in the gallery.

I have noticed a strange thing in the albums directory;
all files have the user-ownership of 'nobody' (looks OK to me) but a group-ownership of '-1' (that puzzles me)
Who can explain this?

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Mon, 2003-05-19 22:26

I've added a specific error message to GR to help users out; thanks for tracing this. Note that the Gallery setup manual does specify that these settings should be altered in order to allow file upload.

 
YogiBeer
YogiBeer's picture

Joined: 2003-06-10
Posts: 9
Posted: Wed, 2003-06-11 23:43

Server: ClarkConnect Home v1.3

Could you clarify this a bit? You see, I don't have a php.conf file ANYWHERE on my linux-box (nor do I have a /etc/httpd/conf.d/ folder (but I do have a /etc/httpd/conf/ folder)).

Should both the LimitRequestBody 16777216 and memory_limit = 64M lines be in both php.ini and php.conf?

I found the memory_limit line in the php.ini file, but not the other one...

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2003-06-12 06:44

From the Gallery README file:

Quote:
8. I CAN'T UPLOAD LARGE FILES!

PHP imposes a restriction on the size of a file upload. This may get
in the way of uploading large zip files. To increase the limit, you
can set the both the "upload_max_size" and "post_max_size" parameters
in your system's php.ini to a large values (like "1000M" for 1000
megabytes). Gallery attempts to modify those values in the local
.htaccess file, but not all servers are set up to pay attention to
that file so you may have to do it by hand.

Even so, there is a limit to the size of a file that PHP can handle,
even if you remove this restriction. Users have reported having issues
uploading files greater than 20MB. Your mileage may vary.

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2003-06-12 06:47

To test whether any of this is a Gallery Remote bug or a Gallery configuration issue, try to upload the same image file using Gallery's browser-based upload.

If it works with Gallery's web-based upload, then it's a Gallery Remote bug, probably.
If not, then you should request help from the Gallery forums :-)