How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask swmcdonnell Your Own Question

swmcdonnell
swmcdonnell, Computer Scientist
Category: Software
Satisfied Customers: 233
Experience:  Steve has many years of experience in software development.
47680681
Type Your Software Question Here...
swmcdonnell is online now
A new question is answered every 9 seconds

We are getting the following error when trying to send

Customer Question

we are getting the following error when trying to send emails and log them in our SQL Server database. The application is written in ColdFusion.
[Macromedia][SQLServer JDBC Driver]Request cannot be submitted due to wire contention.
This message appears after over 1000+ emails are sent and logged, then all of the remaining attempts result in this message.
Submitted: 2 months ago.
Category: Software
Expert:  Andrew James replied 2 months ago.

Hello,

This is usually caused by the JDBC Driver having a buffer set too low, or not to 'unlimited/0'. Basically, what you are seeing (and i'm guessing you're sending large amounts of mail at once) is that the process rolling through your queue, and after it hits so many (somewhere in the 1000+ range) you are hitting the buffer limit. I'd need a full stacktrace around the time it starts failing from the process to give you a more exact cause. But I can tell you just from the error and how you describe it happening its resource contention, whether its literally your script is eating up everything server side, (but i'd expect an OOM and it sounds like your script keeps going just fails to connect) or its limitations in the drivers configurations.

Take a look at InsensitiveResultSetBufferSize https://docs.oracle.com/cd/E13157_01/wlevs/docs30/jdbc_drivers/mssqlserver.html which is where I expect you are having this problem. Usually this gets set to a low number, increasing it or setting it to 0 usually helps with wire contention issues.

Let me know if that helps or if you've already tried that direction. If you can get a full stack trace if that doesn't help, I may be able to see more

Customer: replied 2 months ago.
We link you sent is for Oracle (not SQL Server) and does not work. We have look everywhere and cannot find a place to set the Buffer size in ColdFusion administrator. A stack trace is attached per your request.
Expert:  Andrew James replied 2 months ago.

Hey,

I'm going to drop you back into the queue for someone else hopefully figure out what's missed.

I apologize, I missed that you were loading the macromedia driver and not the oracle driver. While all java, you are correct they are different. I do expect the issue you are having is similar between the two, but I expect, like with the oracle driver, this is not something you can modify through the administrator panel.

I looked over the strace for a bit, but I couldn't find anything that said "this is surely the fault, blame this". So hopefully another expert will.

Expert:  swmcdonnell replied 2 months ago.

Hi there, my name is***** few things:

  1. Can you post the code in the application where it's connecting to the database?
  2. Can you tell me exactly what it's logging to the database? I want to get a sense of whether it's logging the entire email vs. just one log line per email.
  3. Did this suddenly start happening, i.e. was it working fine and all of a sudden it stopped working? If so, what changes did you make to the SQL Server database or the application, if any?
Customer: replied 2 months ago.
1.Can you post the code in the application where it's connecting to the database?
THE CONNECTIONTO THE DATABASE IS DONE VIA A STORED PROCEDURE CALL: <cfstoredproc datasource="#Application.datasource#" procedure="getMktgMessageMyContact">2. Can you tell me exactly what it's logging to the database? I want to get a sense of whether it's logging the entire email vs. just one log line per email.
IT IS GENERATING A NEW RECORD IN THE SENT TABLE FOR EACH EMAIL SENT (AS THEY ARE SENT, NOT IN A GROUP)3. Did this suddenly start happening, i.e. was it working fine and all of a sudden it stopped working? If so, what changes did you make to the SQL Server database or the application, if any?
WE HAD TO REBUILD OUR SERVER FROM A BACKUP BECAUSE OUR PREVIOUS SERVER WAS TERMINATED SO WE CANNOT SEE WHAT IS DIFFERENT.
Expert:  swmcdonnell replied 2 months ago.

OK, so it was working OK and then you replaced the server, so it's most likely a setting on the server side. When you say it's generating a new record in the Sent table, what does it store? The entire email or just a little log information that it was sent?

Expert:  swmcdonnell replied 2 months ago.

Have you checked the SQL Server logs? What do they say?

Customer: replied 2 months ago.
No errors appear in the SQL Server logs.
Expert:  swmcdonnell replied 2 months ago.

You haven't told me yet how much data it's storinig about each email it sends.

Can you give me the code in the stored procedure for connecting to the database?

Customer: replied 1 month ago.
It stores the html version of the email and identifiers of the message and recipient as well as dates.
Expert:  swmcdonnell replied 1 month ago.

Thank you. And the connection code?

Customer: replied 1 month ago.
There is no code in the stored procedure for connecting to the database since the stored procedure RESIDES in the database.
Expert:  swmcdonnell replied 1 month ago.

Right. Sorry, since it already existed I thought you might have a copy of it somewhere, since the issue is connecting to the database and not recovering or rebuilding its contents.