Isssues with Appium 1.6.5 Parallel execution using Selenium Grid+TestNG

I am trying to execute same script parallely on multiple devices either on Android - Android or Android - iOS . Execution starts on both devices and some steps will also execute on both devices but after some time either one or the other device execution will fail.

In the log it says like get the Appium status for some time then Appium.deletesession() method will get called and execution stops in that device only but the other device execution will work fine and scripts passes.

I am using JSON files for node configuration . Attached JSON files and Appium logTerminal Saved Output.txt (861.2 KB)
for ref.
My execution system details

  1. Appium terminal 1.6.5
    2.Mac OS X EI Captain 10.11.6
  2. Selenium standalone version 2.53.1 . Tried with 3.4.0 also latest one
  3. Selenium Webdriver 2.53.1
  4. Tried with Android real devices also 6 and 7 and Emulator too.
  5. Used iPhone 6 and 7 Simulator.

Please help me with this . If anyone needs any info let me know.DeviceNodeconfig.txt (588 Bytes)