Thanks for your return, much appreciated :)

I load the modification on trunk at 1840526

Cheers,

Nicolas


On 07/09/2018 17:22, Nicolas Malin wrote:
Hi,

On a customer site, we have huge services that call different rest api to collect information To increase the velocity we run all them by persistence asynchrone then the job pooler manage them with available resources.

The problem is, when a call failed and the service threw an error, the service engine reschedule it, ... and it failed, rescheduled, failed, rescheduled, failed ... with beautiful result to overload your pool with zombie services.

The solution is easy, set on your service definition attribute max-retry to 0 (or 1, if you want one retry) but I didn't understand why we have this configuration to reschedule indefinitely a service if it is in error.

This configuration exists before apache migration so I'd happy to have your vision about this. From my view, I'm in favor to set max retry to 0 by default and left the developer set him self when he wants that a service restart after a failure.

Easy change  :
Index: framework/service/src/main/java/org/apache/ofbiz/service/job/PersistedServiceJob.java

@@ -80,7 +80,7 @@
         this.jobValue = jobValue;
         Timestamp storedDate = jobValue.getTimestamp("runTime");
         this.startTime = storedDate.getTime();
-        this.maxRetry = jobValue.get("maxRetry") != null ? jobValue.getLong("maxRetry") : -1; +        this.maxRetry = jobValue.get("maxRetry") != null ? jobValue.getLong("maxRetry") : 0;

Nicolas


Reply via email to