2

I'm trying to upload shapefile to GeoServer with REST API. It is working with most of the shapefiles, but I have problems when I try to upload a large shapefile.

The .zip file is 21.1 MB. Contains the dbf (11mb), prj (145 byte), .shp (33Mb) etc.

The WebResponse gives me:

"The underlying connection was closed: The connection was closed unexpectedly."

Do you have any idea?

  • did you check your internet uploading speed? in my case i was receiving a message "connection timed out" – Mehreen Mar 2 '16 at 21:03
  • Yes. I checked. But this error happens between two amazon servers. I upload the file to one amazon server, than I call the geoserver post which is another amazon server. It should be fast. – Laca Mar 3 '16 at 12:52
3

You seem to be on the right track that the size of the files my be the cause of the issue, only because the transfer of the data seems to be timing out. You read more about a potential the causes/solution here. Here is a summary of the above link.

Cause
Errors like these happen because the remote server (to which the call was being made) did not deliver a response to your request and cut the connection before an answer could be sent. Meaning:

Your application (the caller) sent the request

While the application was waiting for the response the remote server cut the connection.

Resolution

Resolving such a problem cannot be done on the caller side (your application) - you need to work with the party that provides the service for you.

If you are the other party or want to help: common causes on the other side for these errors are:

The request is taking too long to run and the server "times it out". If another OutSystems Platform is on the receiving end (meaning: the web call is to an OutSystems Platform) you may want to look here. The remote server is having issues. E.g. application pool recycling
or crashes that interrupt logic that may be runnning.
A network layer is cutting the network connection half-way. You may see errors in the remote server similar to this one (e.g. "could not flush response

  • You were right... I had to increase the request timeout. Now it doesn't give me error, but I never got response. It takes too much time (I'm waiting 40 mins until now, without response.) Maybe the geoserver can't process it on the fly? I'm still waiting the response from the server... – Laca Mar 3 '16 at 12:17
  • Perhaps your right about the Geoserver and processing on the fly being an issue? – whyzar Mar 3 '16 at 12:44
  • After 1 hours, I got the error: The remote server returned an error: NotFound. But the fiddler doesn't show response. It is empty. Thanks for your responses, I don't give up, I'm trying to figure it out. – Laca Mar 3 '16 at 12:54

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.