Comments (6)
Hi DBouyssie,
In some servers, functions are deleted when there are no job or workers.
However, if you set a job cap on the function, it too is deleted. I keep the
functions alive to maintain it's state. If there is a memory issue, the garbage
collector will clean up any unused function to prevent an out of memory error.
In most systems the function names are static and it's not an issue. What
exactly are you trying to do? Given a good argument, I might change it.
Original comment by [email protected]
on 16 Feb 2012 at 9:40
from java-gearman-service.
Here is my setup (all on localhost):
- a java-gearman-service server,
- no worker,
- an echo client (written in Scala but using the java-gearman-service API).
When I run the client, it starts but doesn't return.
Because no worker is registered I would have expected to get an error message
saying there is no available worker able to make the echo job.
Here is the log I have :
févr. 17, 2012 8:55:11 AM org.gearman.GearmanLogger log
Infos: CLIENT@640159b3: [127.0.0.1:4730] : Connected
févr. 17, 2012 8:55:11 AM org.gearman.GearmanLogger log
Infos: CLIENT@640159b3: [127.0.0.1:4730] : OUT : SUBMIT_JOB
févr. 17, 2012 8:55:11 AM org.gearman.GearmanLogger log
Infos: CLIENT@640159b3: [127.0.0.1:4730] : IN : JOB_CREATED
Original comment by [email protected]
on 17 Feb 2012 at 7:58
from java-gearman-service.
This is the expected behavior. When a job is received without a worker, it sits
in the queue until a worker can pick it up.
In a gearman application, it's best to know the system's architecture and know
what servers have (or will have) the applicable workers. Your setup should look
something like this
(http://www.moskalyuk.com/blog/wp-content/uploads/image5.png). Something fairly
static.
Ultimately gearman is just a load-balancing framework. It's not designed for
building complected dynamic networks.
Original comment by [email protected]
on 17 Feb 2012 at 5:02
from java-gearman-service.
Ok I didn't realize this point.
Do you know the Java/Scala akka framework ?
Maybe it is better suitted for this kind of task.
Thanks.
Enjoy your week-end !
Original comment by [email protected]
on 17 Feb 2012 at 5:58
from java-gearman-service.
Sorry, I don't know anything Java/Scala :\
I'm going to close this issue for now. If other users start complaining about
the functions not being deleted, I'll reconsider changing the behavior.
Original comment by [email protected]
on 17 Feb 2012 at 9:10
- Changed state: WontFix
from java-gearman-service.
I think I have found a workaround. Using the telnet interface and sending text
commands I can know the list of registered functions on the server. So I will
extend my clients in order to check that the job they want to perform is well
registered before sending the request.
For information akka is a framework which supports two implementations one for
Java and an other one for scala. Just wondered if you have ever heard about it.
Original comment by [email protected]
on 18 Feb 2012 at 10:06
from java-gearman-service.
Related Issues (20)
- Suspected memory leak HOT 8
- java.lang.NullPointerException HOT 5
- v0.6.4 not properly disconnecting HOT 1
- The gearman worker behaves incorectly when a function is removed and added from within the worker HOT 1
- Connection lost, fail to reconnect HOT 22
- Get the job handle from the GearmanFunction HOT 3
- Worker is not closing connections on shutdown. HOT 1
- NullPointerException HOT 2
- Possible Memory Leak HOT 1
- Gearman worker stopped connecting to server HOT 1
- GearmanClient timeout missing HOT 2
- Gearman shutdown issue
- GearmanJobReturnImpl.java poll(timeout,timeunit) function fail,
- After timeout on GRAB_JOB no futher jobs are processed and connection is dropped every 20 seconds HOT 4
- Worker disconnects 30 sec after PRE_SLEEP HOT 10
- exported .jar with 'echo' example produces errors HOT 4
- Null pointer exception when trying to unregister a function
- java.util.ConcurrentModificationException on the server side
- fake workers on gearman server HOT 1
- Gearman workers wont connnect to the daemon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-gearman-service.