Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. page timesout

page timesout

Scheduled Pinned Locked Moved ASP.NET
databasecssquestion
17 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VickyC
    wrote on last edited by
    #1

    I have a gridview that displays about 2-50 records. While the stored procedure in SQL Query analyzer or the sqldatasource takes less than a couple seconds to run it takes forever for the gridview to display the data. At a difference instance I have tried to display the data with a repeater. It seems that there is no improvement. Has anybody experienced something like this?

    G 1 Reply Last reply
    0
    • V VickyC

      I have a gridview that displays about 2-50 records. While the stored procedure in SQL Query analyzer or the sqldatasource takes less than a couple seconds to run it takes forever for the gridview to display the data. At a difference instance I have tried to display the data with a repeater. It seems that there is no improvement. Has anybody experienced something like this?

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      What are you doing in the stored procedure to make it take several seconds to fetch so little data? I would expect at least less than 0.1 seconds. Similarly, what are you doing with the gridview to make it take any time to display so little data? Any code that you can show might help shed some light...

      --- single minded; short sighted; long gone;

      V 1 Reply Last reply
      0
      • G Guffa

        What are you doing in the stored procedure to make it take several seconds to fetch so little data? I would expect at least less than 0.1 seconds. Similarly, what are you doing with the gridview to make it take any time to display so little data? Any code that you can show might help shed some light...

        --- single minded; short sighted; long gone;

        V Offline
        V Offline
        VickyC
        wrote on last edited by
        #3

        Well the stored procedure summarizes the sales for product(s) sold to customers for every month by salesman. The SQL is quiet complex and I do not think that this relevant though. It just passes back 27 columns" Shipping company, Curent Year Sales By Month(12 columns), Total, Last Year Sales By Month(12 columns), Total. But the rest of the code I think that is pretty straight forward: SqlDataSource1.SelectParameters.Clear(); SqlDataSource1.SelectParameters.Add("Year", year.ToString()); SqlDataSource1.SelectParameters.Add("Prod", prod.ToString().Trim()); SqlDataSource1.SelectParameters.Add("Salesman", salesman.ToString()); SqlDataSource1.DataBind(); GridView1.DataSource = SqlDataSource1; GridView1.DataBind(); It is the Gridview1.DataBind() that takes forever. The SQL profiler shows that the stored procedure(s) have been executed.

        P 1 Reply Last reply
        0
        • V VickyC

          Well the stored procedure summarizes the sales for product(s) sold to customers for every month by salesman. The SQL is quiet complex and I do not think that this relevant though. It just passes back 27 columns" Shipping company, Curent Year Sales By Month(12 columns), Total, Last Year Sales By Month(12 columns), Total. But the rest of the code I think that is pretty straight forward: SqlDataSource1.SelectParameters.Clear(); SqlDataSource1.SelectParameters.Add("Year", year.ToString()); SqlDataSource1.SelectParameters.Add("Prod", prod.ToString().Trim()); SqlDataSource1.SelectParameters.Add("Salesman", salesman.ToString()); SqlDataSource1.DataBind(); GridView1.DataSource = SqlDataSource1; GridView1.DataBind(); It is the Gridview1.DataBind() that takes forever. The SQL profiler shows that the stored procedure(s) have been executed.

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          Is the SqlDataSource1.DataBind() necessary? Is the stored proc being executed twice by any chance?

          "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

          V 1 Reply Last reply
          0
          • P Paul Conrad

            Is the SqlDataSource1.DataBind() necessary? Is the stored proc being executed twice by any chance?

            "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

            V Offline
            V Offline
            VickyC
            wrote on last edited by
            #5

            No is not necessary. The stored procedure is not executed twice. I wonder if in IIS there is a limit on the page size.

            P 1 Reply Last reply
            0
            • V VickyC

              No is not necessary. The stored procedure is not executed twice. I wonder if in IIS there is a limit on the page size.

              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #6

              VickyC# wrote:

              I wonder if in IIS there is a limit on the page size

              Are you running your web app and database on the same machine or are you fetching the data over the network? Since your stored proc is only pulling out 27 records, it shouldn't be close to any page size limit. How quick does the stored proc run by itself when shot through query analyzer?

              "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

              V 1 Reply Last reply
              0
              • P Paul Conrad

                VickyC# wrote:

                I wonder if in IIS there is a limit on the page size

                Are you running your web app and database on the same machine or are you fetching the data over the network? Since your stored proc is only pulling out 27 records, it shouldn't be close to any page size limit. How quick does the stored proc run by itself when shot through query analyzer?

                "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                V Offline
                V Offline
                VickyC
                wrote on last edited by
                #7

                No they are on different machines. It is 27 columns 2-50 rows. But this is a part of a fairly sizable page. The stored procedure in SQL Query analyzer takes less than 2 seconds in the worst case.

                V P 2 Replies Last reply
                0
                • V VickyC

                  No they are on different machines. It is 27 columns 2-50 rows. But this is a part of a fairly sizable page. The stored procedure in SQL Query analyzer takes less than 2 seconds in the worst case.

                  V Offline
                  V Offline
                  VickyC
                  wrote on last edited by
                  #8

                  It has a performance index of .69.

                  1 Reply Last reply
                  0
                  • V VickyC

                    No they are on different machines. It is 27 columns 2-50 rows. But this is a part of a fairly sizable page. The stored procedure in SQL Query analyzer takes less than 2 seconds in the worst case.

                    P Offline
                    P Offline
                    Paul Conrad
                    wrote on last edited by
                    #9

                    Since it is only 27 columns with 2-50 rows, that shouldn't be very heavy weight at all. If you don't mind me asking, what are the other things going on in the page since you say it is a fairly sizable page?

                    "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                    V 1 Reply Last reply
                    0
                    • P Paul Conrad

                      Since it is only 27 columns with 2-50 rows, that shouldn't be very heavy weight at all. If you don't mind me asking, what are the other things going on in the page since you say it is a fairly sizable page?

                      "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                      V Offline
                      V Offline
                      VickyC
                      wrote on last edited by
                      #10

                      There are just similar queries that provide sales analysis and forecasting. 9 gridviews 2 dropdown list boxes, 7 radio buttons, 1 textbox, 1 button, 8 sqldatasources. The total size of the aspx is about 189k. But at any given time only a few of these are activated.

                      P 1 Reply Last reply
                      0
                      • V VickyC

                        There are just similar queries that provide sales analysis and forecasting. 9 gridviews 2 dropdown list boxes, 7 radio buttons, 1 textbox, 1 button, 8 sqldatasources. The total size of the aspx is about 189k. But at any given time only a few of these are activated.

                        P Offline
                        P Offline
                        Paul Conrad
                        wrote on last edited by
                        #11

                        How many of these other features of the page are running along side with the stored proc in question? Are the other gridviews, dropdowns, and 8 datasources active when you run the stored proc? Sounds like a pretty heavy duty page. Just trying to visualize it :-D Not sure of how much more assistance I can be, but there must be some silly thing going on here. I'd just look through everything and see what is bottlenecking your page. Even with all the features you mention, it should be within reasonable bounds.

                        "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                        V 1 Reply Last reply
                        0
                        • P Paul Conrad

                          How many of these other features of the page are running along side with the stored proc in question? Are the other gridviews, dropdowns, and 8 datasources active when you run the stored proc? Sounds like a pretty heavy duty page. Just trying to visualize it :-D Not sure of how much more assistance I can be, but there must be some silly thing going on here. I'd just look through everything and see what is bottlenecking your page. Even with all the features you mention, it should be within reasonable bounds.

                          "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                          V Offline
                          V Offline
                          VickyC
                          wrote on last edited by
                          #12

                          It is a heavy duty page but as you say is just a silly thing. 1. At any given time only a single selection is done 2. Just pass parameters to an sql data source. 3. The stored procedure(s) do the work. 4. Analyze/format/populate the data into a grid view. 5. Trigger via the selection item of the main grid 2 more detailed grid views. The process is repeated for the detailed gridviews. Sometimes there is no page expiration. But then some times when larger datasets are called then for sure there will be a page timeout. It all way though happens on the gridview databind. The larger datasets are not that large (50 recs vs 2). The underlying data of the stored procedure contain lot of data. But how could this be relevant? On stand alone page there is no issue. But I would hate to separate the gridviews since they provide an nice concise presentation.

                          P 1 Reply Last reply
                          0
                          • V VickyC

                            It is a heavy duty page but as you say is just a silly thing. 1. At any given time only a single selection is done 2. Just pass parameters to an sql data source. 3. The stored procedure(s) do the work. 4. Analyze/format/populate the data into a grid view. 5. Trigger via the selection item of the main grid 2 more detailed grid views. The process is repeated for the detailed gridviews. Sometimes there is no page expiration. But then some times when larger datasets are called then for sure there will be a page timeout. It all way though happens on the gridview databind. The larger datasets are not that large (50 recs vs 2). The underlying data of the stored procedure contain lot of data. But how could this be relevant? On stand alone page there is no issue. But I would hate to separate the gridviews since they provide an nice concise presentation.

                            P Offline
                            P Offline
                            Paul Conrad
                            wrote on last edited by
                            #13

                            VickyC# wrote:

                            The underlying data of the stored procedure contain lot of data. But how could this be relevant?

                            It shouldn't.

                            VickyC# wrote:

                            I would hate to separate the gridviews since they provide an nice concise presentation.

                            I wouldn't. Most sales people I've ever run into, like the big picture. Do you have any code profilers to use? You may want to look at execution paths of your code...

                            "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                            V 1 Reply Last reply
                            0
                            • P Paul Conrad

                              VickyC# wrote:

                              The underlying data of the stored procedure contain lot of data. But how could this be relevant?

                              It shouldn't.

                              VickyC# wrote:

                              I would hate to separate the gridviews since they provide an nice concise presentation.

                              I wouldn't. Most sales people I've ever run into, like the big picture. Do you have any code profilers to use? You may want to look at execution paths of your code...

                              "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                              V Offline
                              V Offline
                              VickyC
                              wrote on last edited by
                              #14

                              I appreciate your support. I just need to hit the sack. It has been a long day.

                              P 1 Reply Last reply
                              0
                              • V VickyC

                                I appreciate your support. I just need to hit the sack. It has been a long day.

                                P Offline
                                P Offline
                                Paul Conrad
                                wrote on last edited by
                                #15

                                VickyC# wrote:

                                I just need to hit the sack. It has been a long day.

                                That is a good debugging tool, the pillow :laugh: Maybe tomorrow it'll stand out what is causing the timeouts :-D Have you tried to increase the timeout for both IIS and the database?

                                "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                                V 1 Reply Last reply
                                0
                                • P Paul Conrad

                                  VickyC# wrote:

                                  I just need to hit the sack. It has been a long day.

                                  That is a good debugging tool, the pillow :laugh: Maybe tomorrow it'll stand out what is causing the timeouts :-D Have you tried to increase the timeout for both IIS and the database?

                                  "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

                                  V Offline
                                  V Offline
                                  VickyC
                                  wrote on last edited by
                                  #16

                                  FYI. My method just worked. May be you should follow it.

                                  P 1 Reply Last reply
                                  0
                                  • V VickyC

                                    FYI. My method just worked. May be you should follow it.

                                    P Offline
                                    P Offline
                                    Paul Conrad
                                    wrote on last edited by
                                    #17

                                    Hey VickyC#, Good morning and what was your method I should follow? Paul

                                    "You will see a delete button on each of your posts. Press it." - Colin Angus Mackay

                                    1 Reply Last reply
                                    0
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • World
                                    • Users
                                    • Groups