Appium crashes in between the execution

Hi,
I am using Appium for Android native app automation. All my scenarios are doing good, but sometimes the App gets crashed and Appium stops saying “Didn’t get a new command in 35 secs, shutting down”. This is the Appium server log:

info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding //[@class=‘android.widget.LinearLayout’][2]/[@class=‘android.widget.ImageButton’][last()] using
XPATH with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[CLASS=android.widget.ImageButton, INSTANCE=4]
info: [debug] Didn’t get a new command in 35 secs, shutting down…
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing: “C:\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 192.168.3.94:5555 shell “input keyevent 3”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
warn: Trying to run a command when one is already in progress. Will spin a bit and try again
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“No element found”,“status”:7}
info: [debug] Responding to client with error: {“status”:7,“value”:{“message”:“An element could not be located on the page using the given
search parameters.”,“origValue”:“No element found”},“sessionId”:“ba93d15e-d81a-4921-88ab-edac4ec9f9c5”}
info: <-- POST /wd/hub/session/ba93d15e-d81a-4921-88ab-edac4ec9f9c5/element 500 36336.152 ms - 195
info: --> POST /wd/hub/session/ba93d15e-d81a-4921-88ab-edac4ec9f9c5/element {“using”:“xpath”,“value”:"//[@class=‘android.widget.LinearLayo
ut’][2]/
[@class=‘android.widget.ImageButton’][last()]"}
info: [debug] Pushing command to appium work queue: [“find”,{“strategy”:“xpath”,“selector”:"//[@class=‘android.widget.LinearLayout’][2]/[
@class=‘android.widget.ImageButton’][last()]",“context”:"",“multiple”:false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“OK, shutting down”,“status”:0}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 163.63
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] We shut down because no new commands came in

I can see Appium is sending request to find the element, but no response has been received. I don’t know why this is happening, but the same thing passes without any issue mostly. When this issue happens, Appium closes the app and the next coming scenarios also gets failed.

Someone help to resolve this issue.

Thanks in advance.

Vinoth S.