APPIUM Server on pararel testing

I have tested appium on appium version 1.22.0 node js worker and express, I run parallel test on 24 devices and maximum 240 devices with chunking per 24 devices and they use different appium ports and different systemports too so 24 servers appium is running, but sometimes when running the test the appium server suddenly turns off and makes it hang how to fix it so that appium uses more resources for testing and keeps it running to avoid this
this my code for start the appium server

I’m asking for help with this as it is very disruptive to my development process any input would be of great value to me

one assumes you tweaked the java engine memory size defaults already?

1 Like

i haven’t setup it yet how to setup that

Try JAVA_OPTS, or else you will have to do so explicitly somehow https://stackoverflow.com/questions/5241743/how-do-i-use-the-java-opts-environment-variable .I used to do this many many years ago for an app, but not sure how it works these days

okay, I’ll give it a try. Is there anything about the setup that I have to do to run this test on multiple devices at the same time with the worker so that it runs normally and can the hangup symptoms be removed?

Have you taken a look at Selenium Grid?

https://www.selenium.dev/documentation/grid/

Might be a lot easier than doing this on your own.

1 Like

i know for my problem i just have this error how to solve this anyone knows

uncaughtException: write EPIPE

Error: write EPIPE ?

this full log

2023-06-11 02:52:24:724 [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:8210/wd/hub/session/156f7a0c-7204-41a4-850a-add62829d9c0/element] with body: {“strategy”:“xpath”,“selector”:"//com.lynx.tasm.behavior.ui.LynxFlattenUI[@content-desc=“Not interested”]",“context”:"",“multiple”:false}
2023-06-11 02:52:24:745 [Appium] Received SIGTERM - shutting down
2023-06-11 02:52:24:747 [Appium] Cleaning up 1 active session
2023-06-11 02:52:24:748 [Appium] Closing session, cause was ‘The process has received SIGTERM signal’
2023-06-11 02:52:24:748 [Appium] Removing session ‘11fa87b5-64a2-44a5-a5c5-16deef2a8e7a’ from our master session list
2023-06-11 02:52:24:761 [UiAutomator2] Deleting UiAutomator2 session
2023-06-11 02:52:24:765 uncaughtException: write EPIPE
Error: write EPIPE

Starting apksigner: /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/reksasyahputra/Library/Android/Sdk/build-tools/30.0.3/lib/apksigner.jar verify --print-certs /usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.5.5.apk

how to change xmx in this action i has been export java_opts but it doesnt work how i find that file include that config

i dont use the selenium grid for some reason