Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7754299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:16:18+00:00 2026-06-01T12:16:18+00:00

I was asked to take over an application, which was running fine under 1-2

  • 0

I was asked to take over an application, which was running fine under 1-2 users testing it, but once we put it through a larger test, it started crashing. We’re seeing random timeouts, along with messages about the code not being able to find certain columns that it expected to be there to bind to, though with just 1-2 users it was working.

The structure of the application is:

--------------
| WebSite    |
--------------
| WebService |
--------------
| Database   |
--------------

The website does all communication with the database via the webservice. Looking through the webservice code, I saw it was using a class to do the database work, and had this declared as a class level variable:

private static SqlConnection cn;

This was then being used in all the methods on the page that would need a connection. Being static, this mean there is just one instance for all users correct? I just want to confirm I’m seeing it correctly, as we removed it and are testing it now. Seeing that line to me means that 1 instance of the connection object was being shared amongst all users, which would explain why it was okay for 1-2 users, but the larger the number of users, the more people were queued waiting for it, eventually leading to the random errors. Just want to confirm I’m understanding this correctly.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:16:19+00:00Added an answer on June 1, 2026 at 12:16 pm

    Yes that static variable will be accessed across users. The real root of the problem is the lack of thread safety though, not necessarily the sharing of a connection object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was recently asked to take over a project in which waveform data is
I’ve been asked to integrate a windows form application with SagePay to take payments
I asked this question over in the actual tutorial, but not sure I'll get
I know that similar questions have been asked all over the place, but I'm
Similar questions have been asked over and over but for some reason none of
I asked a question previously on how to take excel data and put it
Recently I was asked to take over the programming updating task of a php
So I've been asked to take over another persons code in WordPress with little
In one of my previous questions I asked how to take a screenshot and
(I asked this question in another way , and got some interesting responses but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.