I\'m using Volley to POST some data stored in a local database to a server. The problem is when I have a big number of entries (for example 500) I get this error:
As a side note, I had the same error from socket.io, whenever I reconnected with socket.connect() new thread would start with old thread still running.
Solved it by calling socket.disconnect() before socket.connect(). Even though socket is already disconnected, calling socket.disconnect() will destroy old thread for you
It is not actually related to the question itself, but I had the same "outofmemoryerror pthread_create" error, which isn't caused by Volley but by socket.io creating new threads every time user tries to reconnect manually (by calling socket.connect, instead of setting "reconnect" option to true). When I was googling for the solution I came to this question and after fixing the problem decided to add the solution here, just in case someone else had the same problem