Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing the "queue full" issue #61

Open
eostermueller opened this issue Oct 3, 2017 · 2 comments
Open

fixing the "queue full" issue #61

eostermueller opened this issue Oct 3, 2017 · 2 comments

Comments

@eostermueller
Copy link

When testing with 100's of SQL per second (and more), I get this message, repeatedly, in the stdout of my spring boot stdout:

2017-10-03 07:19:02.147 WARN 9934 --- [tp1768882706-66] c.s.j.logger.SocketLogSender : queue full, dropping remote log of statement

Cranking up the size of LinkedBlockingQueueo fixes this. I've got a local copy of this fix, this issue is my "todo" reminder to submit the pr. I think moving from the 10000 below to 100000 (adding a zero) did the trick.

public class SocketLogSender implements Runnable, LogSender {
    private final static Logger LOGGER2 = Logger.getLogger(SocketLogSender.class);

    private final BlockingQueue<LogMessage> logsToSend = new LinkedBlockingQueue<LogMessage>(10000);
@eostermueller
Copy link
Author

one low-tech fix is to add a parameter for this size. People who get the "queue full" message can use the parameter to bump up the size.

This suggests that changing the size on the fly isn't really an option:

https://stackoverflow.com/questions/6600023/re-sizeable-java-blockingqueue

@sylvainlaurent
Copy link
Owner

  1. +1 to make the queue size configurable (at least statically)
  2. I wonder if in your use case we should not slow down the producer threads by using queue.put(..) instead of queue.offer(..). This could also be configurable.

Feel free to propose a PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants