CDOSYS executes but takes TOO TOO long?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?SlZSdWRuaWNr?=

    CDOSYS executes but takes TOO TOO long?

    Hey all...
    running w2k3/iis6 and trying to shorten the length of time that a simple 10
    field ASP form takes to execute using CDOSYS. it takes about 50 seconds each
    time...and I've no idea why?

    any pointers here lads? on other servers the exact same script does it's job
    in 3 seconds...but not this one?

    ???

    Jim
  • Jon Paal [MSMD]

    #2
    Re: CDOSYS executes but takes TOO TOO long?

    so, the ASP code is working but it takes too long on a given server......

    have you contacted the server administrator ??

    checked any logs ??

    or ????

    how are we supposed to help with this ?


    "JVRudnick" <JVRudnick@disc ussions.microso ft.comwrote in message news:F516B9C6-E023-4DA4-81E0-0C45E8C7A344@mi crosoft.com...
    Hey all...
    running w2k3/iis6 and trying to shorten the length of time that a simple 10
    field ASP form takes to execute using CDOSYS. it takes about 50 seconds each
    time...and I've no idea why?
    >
    any pointers here lads? on other servers the exact same script does it's job
    in 3 seconds...but not this one?
    >
    ???
    >
    Jim

    Comment

    • Anthony Jones

      #3
      Re: CDOSYS executes but takes TOO TOO long?

      "JVRudnick" <JVRudnick@disc ussions.microso ft.comwrote in message
      news:F516B9C6-E023-4DA4-81E0-0C45E8C7A344@mi crosoft.com...
      Hey all...
      running w2k3/iis6 and trying to shorten the length of time that a simple
      10
      field ASP form takes to execute using CDOSYS. it takes about 50 seconds
      each
      time...and I've no idea why?
      >
      any pointers here lads? on other servers the exact same script does it's
      job
      in 3 seconds...but not this one?
      >
      It might be worth you confirming which part of your script is taking most of
      the time but its going to be the send. It will be some configuration
      problem that is causing something like DNS lookups or user authentication to
      take a long time.


      --
      Anthony Jones - MVP ASP/ASP.NET


      Comment

      • =?Utf-8?B?SlZSdWRuaWNr?=

        #4
        Re: CDOSYS executes but takes TOO TOO long?

        First thanks guys. Next, its on my own ded server so that makes me the
        SysAdmin I suppose. Next, I do not know any manner to test "which" part of
        the script is taking the time. Mailogs show it's in the outbound queue for
        seconds, so I doubt that the problem is with MainEnablePro. It must be IMHO,
        the script itself, yet as I said it runs in 3 secs on other servers. Hmmm,
        maybe it's the library I'm using as it's still the w2k one... ie

        METADATA
        TYPE="typelib"
        UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
        NAME="CDO for Windows 2000 Library"

        Anyone know, is there a more recent one for w2k3? Might that be "it" problem
        wise?

        Jim

        Comment

        • Anthony Jones

          #5
          Re: CDOSYS executes but takes TOO TOO long?

          "JVRudnick" <JVRudnick@disc ussions.microso ft.comwrote in message
          news:CEB2B5BF-C2C9-4C73-A9F9-45A71DE8EBEE@mi crosoft.com...
          First thanks guys. Next, its on my own ded server so that makes me the
          SysAdmin I suppose. Next, I do not know any manner to test "which" part of
          the script is taking the time.
          Here is a noddy example.

          Dim sPath
          Dim oStream

          sPath = Server.MapPath( "/myLogs/" & Session.Session ID & ".log")
          Dim fso : Set fso = CreateObject("S cripting.FileSy stemObject")
          Dim oStream: Set oStream = fso.OpenTextFil e(sPath, 8, True)

          oStream.WriteLi ne "Script Started: " & Now

          'Code building message in oMsg

          oStream.WriteLi ne "Entering Send: " & Now

          oMsg.Send

          oStream.WriteLi ne "Exited Send:" & Now

          oStream.Close

          >Mailogs show it's in the outbound queue for
          seconds, so I doubt that the problem is with MainEnablePro. It must be
          IMHO,
          the script itself, yet as I said it runs in 3 secs on other servers. Hmmm,
          maybe it's the library I'm using as it's still the w2k one... ie
          >
          METADATA
          TYPE="typelib"
          UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
          NAME="CDO for Windows 2000 Library"
          >
          Anyone know, is there a more recent one for w2k3? Might that be "it"
          problem
          wise?
          >
          I doubt it. The GUID is the same on XP and 2003. Its the same component.

          --
          Anthony Jones - MVP ASP/ASP.NET


          Comment

          • =?Utf-8?B?SlZSdWRuaWNr?=

            #6
            Re: CDOSYS executes but takes TOO TOO long?

            Do you mean, Anthony, that I should just cut and paste that script into a new
            ..asp page, run it on the server in the domain root folder and then see what
            happens?

            ie is that how I'd get a report on same?

            Jim

            "Anthony Jones" wrote:
            "JVRudnick" <JVRudnick@disc ussions.microso ft.comwrote in message
            news:CEB2B5BF-C2C9-4C73-A9F9-45A71DE8EBEE@mi crosoft.com...
            First thanks guys. Next, its on my own ded server so that makes me the
            SysAdmin I suppose. Next, I do not know any manner to test "which" part of
            the script is taking the time.
            >
            Here is a noddy example.
            >
            Dim sPath
            Dim oStream
            >
            sPath = Server.MapPath( "/myLogs/" & Session.Session ID & ".log")
            Dim fso : Set fso = CreateObject("S cripting.FileSy stemObject")
            Dim oStream: Set oStream = fso.OpenTextFil e(sPath, 8, True)
            >
            oStream.WriteLi ne "Script Started: " & Now
            >
            'Code building message in oMsg
            >
            oStream.WriteLi ne "Entering Send: " & Now
            >
            oMsg.Send
            >
            oStream.WriteLi ne "Exited Send:" & Now
            >
            oStream.Close
            >
            >
            Mailogs show it's in the outbound queue for
            seconds, so I doubt that the problem is with MainEnablePro. It must be
            IMHO,
            >
            the script itself, yet as I said it runs in 3 secs on other servers. Hmmm,
            maybe it's the library I'm using as it's still the w2k one... ie

            METADATA
            TYPE="typelib"
            UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
            NAME="CDO for Windows 2000 Library"

            Anyone know, is there a more recent one for w2k3? Might that be "it"
            problem
            wise?
            >
            I doubt it. The GUID is the same on XP and 2003. Its the same component.
            >
            --
            Anthony Jones - MVP ASP/ASP.NET
            >
            >
            >

            Comment

            • =?Utf-8?B?SlZSdWRuaWNr?=

              #7
              Re: CDOSYS executes but takes TOO TOO long?

              Hmm....got that script up and running ok - but it seems to choke? I properly
              put all where the items belong, but when the script hits the oMail.SEND line,
              it chokes (my var is oMail for this page btw)?

              The logs quite properly show the Script Started and Entering Send lines and
              times...but as the script then errors out with nothing more than a 2 line
              error --

              error '8004020f'
              /sendForm.asp, line 135

              -- I'm lost. Have no exp using this method to write a timing handler....

              Can you offer why the simple addition of this item makes the SEND function
              quit before it even starts?

              Jim

              Comment

              • =?Utf-8?B?SlZSdWRuaWNr?=

                #8
                Re: CDOSYS executes but takes TOO TOO long?

                Ignore what's above....sorry, just can't type today!

                Here's the log --

                Script Started: 2/24/2008 3:24:42 PM
                Entering Send: 2/24/2008 3:24:42 PM
                Exited Send:2/24/2008 3:25:15 PM

                As you can see, the SEND function worked in less than a second.

                So why those extra 48 seconds (as it averages about 50 in total) ???

                Jim

                "JVRudnick" wrote:
                Hmm....got that script up and running ok - but it seems to choke? I properly
                put all where the items belong, but when the script hits the oMail.SEND line,
                it chokes (my var is oMail for this page btw)?
                >
                The logs quite properly show the Script Started and Entering Send lines and
                times...but as the script then errors out with nothing more than a 2 line
                error --
                >
                error '8004020f'
                /sendForm.asp, line 135
                >
                -- I'm lost. Have no exp using this method to write a timing handler....
                >
                Can you offer why the simple addition of this item makes the SEND function
                quit before it even starts?
                >
                Jim
                >

                Comment

                • Anthony Jones

                  #9
                  Re: CDOSYS executes but takes TOO TOO long?


                  "JVRudnick" <JVRudnick@disc ussions.microso ft.comwrote in message
                  news:8CA1BC56-AC5F-4639-AEE8-5E2B1D65146A@mi crosoft.com...
                  Ignore what's above....sorry, just can't type today!
                  >
                  Here's the log --
                  >
                  Script Started: 2/24/2008 3:24:42 PM
                  Entering Send: 2/24/2008 3:24:42 PM
                  Exited Send:2/24/2008 3:25:15 PM
                  >
                  As you can see, the SEND function worked in less than a second.
                  >
                  So why those extra 48 seconds (as it averages about 50 in total) ???
                  >

                  Is that how you read it? What I see is the send function alone taking 33
                  seconds to complete. You have placed the "Entrying send" and "Exiting send"
                  log lines directly adjacent either side of the call to send, right?


                  --
                  Anthony Jones - MVP ASP/ASP.NET


                  Comment

                  • =?Utf-8?B?SlZSdWRuaWNr?=

                    #10
                    Re: CDOSYS executes but takes TOO TOO long?

                    good gosh...you're absolutely right! I not only couldn't type yesterday, but
                    obviously couldn't read a log either!

                    that mea culpa stated....I agree. 33 seconds is the time it too, and yes the
                    lines are properly placed around the oMail.SEND line too.

                    So...why? that's what's got me stumped!

                    3 seconds on one server and 33 on the other.....

                    ?

                    Jim

                    "Anthony Jones" wrote:
                    >
                    "JVRudnick" <JVRudnick@disc ussions.microso ft.comwrote in message
                    news:8CA1BC56-AC5F-4639-AEE8-5E2B1D65146A@mi crosoft.com...
                    Ignore what's above....sorry, just can't type today!

                    Here's the log --

                    Script Started: 2/24/2008 3:24:42 PM
                    Entering Send: 2/24/2008 3:24:42 PM
                    Exited Send:2/24/2008 3:25:15 PM

                    As you can see, the SEND function worked in less than a second.

                    So why those extra 48 seconds (as it averages about 50 in total) ???
                    >
                    >
                    Is that how you read it? What I see is the send function alone taking 33
                    seconds to complete. You have placed the "Entrying send" and "Exiting send"
                    log lines directly adjacent either side of the call to send, right?
                    >
                    >
                    --
                    Anthony Jones - MVP ASP/ASP.NET
                    >
                    >
                    >

                    Comment

                    • Anthony Jones

                      #11
                      Re: CDOSYS executes but takes TOO TOO long?

                      "JVRudnick" <JVRudnick@disc ussions.microso ft.comwrote in message
                      news:3B0BF3E0-0B9B-4BFA-ACCF-8DD07C2F1D4E@mi crosoft.com...
                      good gosh...you're absolutely right! I not only couldn't type yesterday,
                      but
                      obviously couldn't read a log either!
                      >
                      that mea culpa stated....I agree. 33 seconds is the time it too, and yes
                      the
                      lines are properly placed around the oMail.SEND line too.
                      >
                      So...why? that's what's got me stumped!
                      >
                      3 seconds on one server and 33 on the other.....
                      >
                      ?

                      Ok so we've established it isn't your script its the SMTP configuration.

                      Are the speedier servers using the same SMTP server?
                      Are you using the local SMTP server on the Web Server or another server?
                      Is it Exchange?
                      Can you review the authentication requirements of the SMTP server?
                      Does you script run as the anonymous user or does it use integrated
                      security?


                      --
                      Anthony Jones - MVP ASP/ASP.NET


                      Comment

                      • =?Utf-8?B?SlZSdWRuaWNr?=

                        #12
                        Re: CDOSYS executes but takes TOO TOO long?

                        yes, same SMTP server being used on both boxes

                        yes, same SMTP setup for both ME and IIS...ie all checkboxes are the same!

                        not using Exchange at all

                        authentication is the plain jane MailEnablePro integrated authentication
                        again on both servers....

                        script is as follows (without message text which is immaterial) --
                        =============== =============== ===========
                        <!--
                        METADATA
                        TYPE="typelib"
                        UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
                        NAME="CDO for Windows 2000 Library"
                        -->


                        Set oMail = Server.CreateOb ject("CDO.Messa ge")

                        Set oMailConfig = Server.CreateOb ject ("CDO.Configura tion")

                        oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpserver") = "mail.domainnam e.com"

                        oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpserverport" ) = 25

                        oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/sendusing") = 2

                        oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpconnectiont imeout") = 60

                        oMailConfig.Fie lds.Update

                        Set oMail.Configura tion = oMailConfig

                        oMail.From = "admin@domainna me.com"
                        ' from this account which is valid on this server

                        oMail.To = "jrudnick@domai nname.com"
                        ' this account ALSO on same server and valid too

                        oMail.Subject = "Website Email Buyer/Seller Form"

                        MessageBody = "text goes here"
                        ' message is here via request.form from page before...

                        oMail.HTMLBody = MessageBody

                        oMail. SEND
                        Set oMail = Nothing

                        Set oMailConfig = Nothing

                        Response.Redire ct("thanks.asp" )
                        =============== =============== =============== ====


                        This is pretty simple. Works in 3 seconds on one server and about 40 or so
                        on the new one.

                        Why? What'm I doing wrong here...this is SO dang dumb...I'm positive I've
                        got a simple mistake...but can NOT find it...

                        Sigh....

                        Jim



                        "Anthony Jones" wrote:
                        Ok so we've established it isn't your script its the SMTP configuration.
                        >
                        Are the speedier servers using the same SMTP server?
                        Are you using the local SMTP server on the Web Server or another server?
                        Is it Exchange?
                        Can you review the authentication requirements of the SMTP server?
                        Does you script run as the anonymous user or does it use integrated
                        security?
                        >
                        >
                        --
                        Anthony Jones - MVP ASP/ASP.NET
                        >
                        >
                        >

                        Comment

                        • Anthony Jones

                          #13
                          Re: CDOSYS executes but takes TOO TOO long?

                          "JVRudnick" <JVRudnick@disc ussions.microso ft.comwrote in message
                          news:3957B156-20D6-42F0-A6BF-34F80C79610E@mi crosoft.com...
                          yes, same SMTP server being used on both boxes
                          >
                          yes, same SMTP setup for both ME and IIS...ie all checkboxes are the same!
                          >
                          not using Exchange at all
                          >
                          authentication is the plain jane MailEnablePro integrated authentication
                          again on both servers....
                          >
                          script is as follows (without message text which is immaterial) --
                          =============== =============== ===========
                          <!--
                          METADATA
                          TYPE="typelib"
                          UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
                          NAME="CDO for Windows 2000 Library"
                          -->
                          >
                          >
                          Set oMail = Server.CreateOb ject("CDO.Messa ge")
                          >
                          Set oMailConfig = Server.CreateOb ject ("CDO.Configura tion")
                          >
                          >
                          oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpserve
                          r") = "mail.domainnam e.com"
                          >
                          >
                          oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpserve
                          rport") = 25
                          >
                          >
                          oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/sendusing
                          ") = 2
                          >
                          >
                          oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpconne
                          ctiontimeout") = 60
                          >
                          oMailConfig.Fie lds.Update
                          >
                          Set oMail.Configura tion = oMailConfig
                          >
                          oMail.From = "admin@domainna me.com"
                          ' from this account which is valid on this server
                          >
                          oMail.To = "jrudnick@domai nname.com"
                          ' this account ALSO on same server and valid too
                          >
                          oMail.Subject = "Website Email Buyer/Seller Form"
                          >
                          MessageBody = "text goes here"
                          ' message is here via request.form from page before...
                          >
                          oMail.HTMLBody = MessageBody
                          >
                          oMail. SEND
                          Set oMail = Nothing
                          >
                          Set oMailConfig = Nothing
                          >
                          Response.Redire ct("thanks.asp" )
                          =============== =============== =============== ====
                          >
                          >
                          This is pretty simple. Works in 3 seconds on one server and about 40 or so
                          on the new one.
                          >
                          Why? What'm I doing wrong here...this is SO dang dumb...I'm positive I've
                          got a simple mistake...but can NOT find it...
                          >
                          Sigh....
                          >

                          If you reduce the connection timeout to say 20 seconds does it fail. My
                          guess it does. The web server is struggling to authenticate with the mail
                          server. Do both servers belong to the same domain, do they have good access
                          to a domain controller, is the web server trusted for delegation?


                          --
                          Anthony Jones - MVP ASP/ASP.NET


                          Comment

                          • =?Utf-8?B?SlZSdWRuaWNr?=

                            #14
                            Re: CDOSYS executes but takes TOO TOO long?

                            I too believe that there is a "struggle" going on. Both servers are ded
                            servers from thePlanet and no are not related at all - ie both have diff
                            clients and domains on them but they both are w2k3/SP2/iis6 boxes. Domain
                            controller and trusted for delegation are beyond my ken tho...what do you
                            mean there?

                            Jim

                            "Anthony Jones" wrote:
                            "JVRudnick" <JVRudnick@disc ussions.microso ft.comwrote in message
                            news:3957B156-20D6-42F0-A6BF-34F80C79610E@mi crosoft.com...
                            yes, same SMTP server being used on both boxes

                            yes, same SMTP setup for both ME and IIS...ie all checkboxes are the same!

                            not using Exchange at all

                            authentication is the plain jane MailEnablePro integrated authentication
                            again on both servers....

                            script is as follows (without message text which is immaterial) --
                            =============== =============== ===========
                            <!--
                            METADATA
                            TYPE="typelib"
                            UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
                            NAME="CDO for Windows 2000 Library"
                            -->


                            Set oMail = Server.CreateOb ject("CDO.Messa ge")

                            Set oMailConfig = Server.CreateOb ject ("CDO.Configura tion")
                            oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpserve
                            r") = "mail.domainnam e.com"
                            oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpserve
                            rport") = 25
                            oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/sendusing
                            ") = 2
                            oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpconne
                            ctiontimeout") = 60

                            oMailConfig.Fie lds.Update

                            Set oMail.Configura tion = oMailConfig

                            oMail.From = "admin@domainna me.com"
                            ' from this account which is valid on this server

                            oMail.To = "jrudnick@domai nname.com"
                            ' this account ALSO on same server and valid too

                            oMail.Subject = "Website Email Buyer/Seller Form"

                            MessageBody = "text goes here"
                            ' message is here via request.form from page before...

                            oMail.HTMLBody = MessageBody

                            oMail. SEND
                            Set oMail = Nothing

                            Set oMailConfig = Nothing

                            Response.Redire ct("thanks.asp" )
                            =============== =============== =============== ====


                            This is pretty simple. Works in 3 seconds on one server and about 40 or so
                            on the new one.

                            Why? What'm I doing wrong here...this is SO dang dumb...I'm positive I've
                            got a simple mistake...but can NOT find it...

                            Sigh....
                            >
                            >
                            If you reduce the connection timeout to say 20 seconds does it fail. My
                            guess it does. The web server is struggling to authenticate with the mail
                            server. Do both servers belong to the same domain, do they have good access
                            to a domain controller, is the web server trusted for delegation?
                            >
                            >
                            --
                            Anthony Jones - MVP ASP/ASP.NET
                            >
                            >
                            >

                            Comment

                            • =?Utf-8?B?SlZSdWRuaWNr?=

                              #15
                              Re: CDOSYS executes but takes TOO TOO long?

                              thinking here....

                              could we take this 'off' this forum and converse via email?

                              let me know if that's okay with you? I've got some results from a component
                              test and further data on this, but don't want to "hog" any bandwidth for
                              others...

                              jrudnick at kkti dot com

                              :-)

                              Jim

                              "JVRudnick" wrote:
                              I too believe that there is a "struggle" going on. Both servers are ded
                              servers from thePlanet and no are not related at all - ie both have diff
                              clients and domains on them but they both are w2k3/SP2/iis6 boxes. Domain
                              controller and trusted for delegation are beyond my ken tho...what do you
                              mean there?
                              >
                              Jim
                              >
                              "Anthony Jones" wrote:
                              >
                              "JVRudnick" <JVRudnick@disc ussions.microso ft.comwrote in message
                              news:3957B156-20D6-42F0-A6BF-34F80C79610E@mi crosoft.com...
                              yes, same SMTP server being used on both boxes
                              >
                              yes, same SMTP setup for both ME and IIS...ie all checkboxes are the same!
                              >
                              not using Exchange at all
                              >
                              authentication is the plain jane MailEnablePro integrated authentication
                              again on both servers....
                              >
                              script is as follows (without message text which is immaterial) --
                              =============== =============== ===========
                              <!--
                              METADATA
                              TYPE="typelib"
                              UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
                              NAME="CDO for Windows 2000 Library"
                              -->
                              >
                              >
                              Set oMail = Server.CreateOb ject("CDO.Messa ge")
                              >
                              Set oMailConfig = Server.CreateOb ject ("CDO.Configura tion")
                              >
                              >
                              oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpserve
                              r") = "mail.domainnam e.com"
                              >
                              >
                              oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpserve
                              rport") = 25
                              >
                              >
                              oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/sendusing
                              ") = 2
                              >
                              >
                              oMailConfig.Fie lds("http://schemas.microso ft.com/cdo/configuration/smtpconne
                              ctiontimeout") = 60
                              >
                              oMailConfig.Fie lds.Update
                              >
                              Set oMail.Configura tion = oMailConfig
                              >
                              oMail.From = "admin@domainna me.com"
                              ' from this account which is valid on this server
                              >
                              oMail.To = "jrudnick@domai nname.com"
                              ' this account ALSO on same server and valid too
                              >
                              oMail.Subject = "Website Email Buyer/Seller Form"
                              >
                              MessageBody = "text goes here"
                              ' message is here via request.form from page before...
                              >
                              oMail.HTMLBody = MessageBody
                              >
                              oMail. SEND
                              Set oMail = Nothing
                              >
                              Set oMailConfig = Nothing
                              >
                              Response.Redire ct("thanks.asp" )
                              =============== =============== =============== ====
                              >
                              >
                              This is pretty simple. Works in 3 seconds on one server and about 40 or so
                              on the new one.
                              >
                              Why? What'm I doing wrong here...this is SO dang dumb...I'm positive I've
                              got a simple mistake...but can NOT find it...
                              >
                              Sigh....
                              >

                              If you reduce the connection timeout to say 20 seconds does it fail. My
                              guess it does. The web server is struggling to authenticate with the mail
                              server. Do both servers belong to the same domain, do they have good access
                              to a domain controller, is the web server trusted for delegation?


                              --
                              Anthony Jones - MVP ASP/ASP.NET

                              Comment

                              Working...