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
--
logoNrd <https://nereide.fr/>
Nicolas Malin
The apache way <http://theapacheway.com/> : *Charity* Apache’s mission
is providing software for the public good.
[email protected]
8 rue des Déportés 37000 TOURS, 02 47 50 30 54
Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way
<http://theapacheway.com/>|réseau LE <http://www.libre-entreprise.org/>