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

[QUERY]the upper limit of spring.jms.servicebus.pool.max-connections #734

Open
MeihuaWang opened this issue Dec 5, 2023 · 1 comment
Open
Labels
azure-spring All azure-spring related issues

Comments

@MeihuaWang
Copy link

MeihuaWang commented Dec 5, 2023

we're using JMS in Spring to access Azure Service Bus in our application, when we set spring.jms.servicebus.pool.max-connections to 100, our application met a error like below, after we changed it to be 50, our application started working, so I'm wondering if 100 exceeds the upper limit of spring.jms.servicebus.pool.max-connections, if so, what's the recommended number for it?

[scheduler-job-run-4] o.h.b.s.app.service.impl.JobRunnable     : org.springframework.jms.UncategorizedJmsException: Uncategorized exception occurred during JMS processing; nested exception is javax.jms.JMSException: Error while attempting to add new Connection to the pool; nested exception is java.lang.NullPointerException: Cannot invoke "org.messaginghub.pooled.jms.pool.PooledConnection.incrementReferenceCount()" because "connection" is null
	at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:311)
	at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:185)
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:507)
	at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:584)
	at org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:661)
	at org.boogoo.attendance.infra.job.SyncPunchFromWeComJob.lambda$invoke$0(SyncPunchFromWeComJob.java:259)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
	at org.boogoo.attendance.infra.job.SyncPunchFromWeComJob.invoke(SyncPunchFromWeComJob.java:257)
	at org.boogoo.attendance.infra.job.SyncPunchFromWeComJob.execute(SyncPunchFromWeComJob.java:175)
	at org.hzero.boot.scheduler.app.service.impl.JobRunnable.jobRun(JobRunnable.java:141)
	at org.hzero.boot.scheduler.app.service.impl.JobRunnable.run(JobRunnable.java:112)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: javax.jms.JMSException: Error while attempting to add new Connection to the pool
	at org.messaginghub.pooled.jms.util.JMSExceptionSupport.create(JMSExceptionSupport.java:82)
	at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createJmsPoolConnection(JmsPoolConnectionFactory.java:719)
	at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createConnection(JmsPoolConnectionFactory.java:247)
	at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createConnection(JmsPoolConnectionFactory.java:242)
	at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:196)
	at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:494)
	... 12 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.messaginghub.pooled.jms.pool.PooledConnection.incrementReferenceCount()" because "connection" is null
	at org.messaginghub.pooled.jms.JmsPoolConnectionFactory.createJmsPoolConnection(JmsPoolConnectionFactory.java:717)
	... 16 more
@MeihuaWang MeihuaWang added the azure-spring All azure-spring related issues label Dec 5, 2023
@Netyyyy
Copy link
Contributor

Netyyyy commented Dec 18, 2023

Hi @MeihuaWang , may I know which version you used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-spring All azure-spring related issues
Projects
None yet
Development

No branches or pull requests

2 participants