CPU profiling for RESTful server to avoid slow process-Collection of common programming errors

I’ve a RESTful server and it crashes pretty often. So, I’m profiling it to check what processes are consuming most of CPU. After quite a time of profiling, I find org.restlet.engine.http.connector.BaseHelper.isWorkingServiceFull has maximum CPU usage on Runnable thread.

Is there any way to enhance the performance? When I change Thread Status to ‘All State’ form ‘Runnable’ java.net.ServerSocket.accept(50%) and java.lang.Thread.sleep(49%) has the maximum CPU usage. What does the sleeping thread and socket has to do with the performance?