i got always a Broken Pipe bugs when i try to send big file (file >100kb approximatly) to another user over chat.
here ist the printStackTrace() for Exception that i got :
E/MessageFragment: Failed to attach file
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:112)
at java.net.SocketOutputStream.write(SocketOutputStream.java:157)
at com.android.okhttp.okio.Okio$1.write(Okio.java:76)
at com.android.okhttp.okio.AsyncTimeout$1.write(AsyncTimeout.java:155)
at com.android.okhttp.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
at com.android.okhttp.okio.RealBufferedSink.write(RealBufferedSink.java:46)
at com.android.okhttp.internal.http.RetryableSink.writeToSocket(RetryableSink.java:78)
at com.android.okhttp.internal.http.HttpConnection.writeRequestBody(HttpConnection.java:240)
at com.android.okhttp.internal.http.HttpTransport.writeRequestBody(HttpTransport.java:56)
at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:778)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:463)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:521)
at co.tinode.tinodesdk.LargeFileHelper.upload(LargeFileHelper.java:78)
at com.android.gudana.tindroid.MessagesFragment.doUpload(MessagesFragment.java:1337)
at com.android.gudana.tindroid.MessagesFragment.access$1000(MessagesFragment.java:130)
at com.android.gudana.tindroid.MessagesFragment$FileUploader.loadInBackground(MessagesFragment.java:1213)
at com.android.gudana.tindroid.MessagesFragment$FileUploader.loadInBackground(MessagesFragment.java:1177)
at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:306)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:59)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:47)
at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:138)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:776)
Release Android Version : v0.15.8-rc1
Server Side : linux Ubuntu 16.04
version of tinode server, : v0.15.8-rc1'
database backend : mysql.
the class responsible for the exception is this one : LargeFileHelper.java line 78 .
I get a wrong answer from the remote server and the client close the connection in finally block " conn.disconnect();"
on Server Side maybe i must increase the size of file or the handler ....
// Large media/blob handlers.
"media": {
// Media handler to use
"use_handler": "fs",
// Maximum size of uploaded file (8MB here for testing, maybe increase to 100MB = 104857600 in prod)
"max_size": 104857600,
// Garbage collection periodicity in seconds
"gc_period": 60,
// Number of unused entries to delete in one pass
"gc_block_size": 100,
// Configurations for various handlers.
"handlers": {
// File system storage.
"fs": {
// File system location to store uploaded files. In case of a cluster it
// must be accessible by all cluster members, i.e. a network drive.
"upload_dir": "uploads"
},
}
}
},
i got always a Broken Pipe bugs when i try to send big file (file >100kb approximatly) to another user over chat. here ist the printStackTrace() for Exception that i got :
E/MessageFragment: Failed to attach file java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:112) at java.net.SocketOutputStream.write(SocketOutputStream.java:157) at com.android.okhttp.okio.Okio$1.write(Okio.java:76) at com.android.okhttp.okio.AsyncTimeout$1.write(AsyncTimeout.java:155) at com.android.okhttp.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176) at com.android.okhttp.okio.RealBufferedSink.write(RealBufferedSink.java:46) at com.android.okhttp.internal.http.RetryableSink.writeToSocket(RetryableSink.java:78) at com.android.okhttp.internal.http.HttpConnection.writeRequestBody(HttpConnection.java:240) at com.android.okhttp.internal.http.HttpTransport.writeRequestBody(HttpTransport.java:56) at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:778) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:463) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405) at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:521) at co.tinode.tinodesdk.LargeFileHelper.upload(LargeFileHelper.java:78) at com.android.gudana.tindroid.MessagesFragment.doUpload(MessagesFragment.java:1337) at com.android.gudana.tindroid.MessagesFragment.access$1000(MessagesFragment.java:130) at com.android.gudana.tindroid.MessagesFragment$FileUploader.loadInBackground(MessagesFragment.java:1213) at com.android.gudana.tindroid.MessagesFragment$FileUploader.loadInBackground(MessagesFragment.java:1177) at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:306) at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:59) at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:47) at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:138) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:776)
Release Android Version : v0.15.8-rc1
Server Side : linux Ubuntu 16.04 version of tinode server, : v0.15.8-rc1' database backend : mysql.
Client-side Tindroid: Android app: Android API level ( 25 , 24 , 27).
the class responsible for the exception is this one : LargeFileHelper.java line 78 . I get a wrong answer from the remote server and the client close the connection in finally block " conn.disconnect();"
on Server Side maybe i must increase the size of file or the handler ....
any idea of the cause of this error ....