Discussions

    Search Discussion
    Most Recent Posts
    Questions regarding ThePort's API library. SOAP and REST API methods are supported here.  
    View All TopicsSubscribePost a Topic or Question
    57 Posts
    Are there maintainance windows that should be avoided?
    By gadgeteer   
    For about the third time now I've hit windows of time where the remote commenting APIs throw an error about timing out (see XML below.)

    The window where timeouts are thrown last for serveral hours and are usually early in the morning (within midnight to 4am timeframe) on Sunday and Monday mornings.

    Is there some kind of processing/maintainance going on around those times that it would be better to avoid calling the APIs during then?

    Sample XML error return:
    <?xml version="1.0" encoding="utf-8"?> <CommentingService>
      <GetCommunityComments>
        <ResponseStatus>Failed</ResponseStatus>
        <ResponseCode>500</ResponseCode>
        <TotalItems>0</TotalItems>
        <error>
          <exception>System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
       at System.Data.SqlClient.SqlDataReader.get_MetaData()
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
       at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
       at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
       at ThePortData.DataProvider.Comment.GetLatestRemoteItemComments(Guid gPartnerID, Guid gUserID, Int32 iResultStart, Int32 iNumResults, Int32&amp; iTotalCount, String sRemoteArticleID, String sRemoteArticleGroupID, Int32 iFeaturedOnlyInd)
       at ThePortBusiness.RemoteCommentCollection.PopulateCommunityCommentsByPaging()
       at ThePortBusiness.RemoteCommentCollection.InstantiateCommunityCommentsByPaging(Guid gPartnerID, Int32 iResultStart, Int32 iNumItems)
       at CommentingService.GetCommunityComments(String DeveloperKey, String ResultStart, String NumItems)</exception>
        </error>
      </GetCommunityComments>
    </CommentingService>

    Categories:  REST APIs
    ReplyRemoveEditUnsubscribeSubscribe

    Visit cameron's profile
    113 Posts
    cameron  says:
    i have also found that early mornings (4-7am) regardless of the day of the week are when our site's pages and especially admin panel are extremely slow to load.  sometimes i have to literally open the same admin page in up to 10 different tabs/windows before one will load.
    Posted:   
    ReplyDirect LinkRemoveEdit

    Visit gadgeteer's profile
    57 Posts
    gadgeteer  says:
    ok, that could easliy be a problem if that same kind of timeout is occurring when our users are posting comments... Mind you the issue has not be reported by our users, but that's not a complete shock.

    I'm looking at it from the stand-point that it would make sense for me not to run the remote commenting pull operations during a maintenance window and reduce the errors thrown my way. Of course that implies I know when the maintainance windows are so I can avoid them.
    Posted:   
    ReplyDirect LinkRemoveEdit

    Visit Kevin Fielding's profile
    285 Posts
    Hello,

    During the early morning hours EST our database back-ups are taking place (to coincide with our minimal traffic time), which is probably what you are seeing in the 4 AM-ish timeframe Cameron.  In general, if it can be avoided, API calls should not be scheduled in the 1-5 AM EST window.  

    Thanks,
    Kevin
    Posted:   
    Project Manager at ThePort Network.


    Block signature
    ReplyDirect LinkRemoveEdit

    Visit gadgeteer's profile
    57 Posts
    gadgeteer  says:
    "API calls should not be scheduled in the 1-5 AM EST window. "

    Thanks I'll program a dark window around that time frame, does that mean I also need to disable commenting during that time? That will impact my user base.
    Posted:   
    ReplyDirect LinkRemoveEdit

    Visit Kevin Fielding's profile
    285 Posts
    I wouldn't say you have to disable commenting.  The errors should be low impact because the back up activity does not affect all features at any given time throughout the window.  The point is if it can be avoided without impacting normal operations, API calls should not be scheduled for this time due to a chance of failing.  However the reason we perform the back ups at this time is because usage is generally so low that the chance of users encountering any error is remote.  But of course I'm not thoroughly familiar with your usage statistics so I can only provide general guidance.  Hope this helps!
    Posted:   
    Project Manager at ThePort Network.


    Block signature
    ReplyDirect LinkRemoveEdit

    Visit gadgeteer's profile
    57 Posts
    gadgeteer  says:
    ok, but most, if not all, of our comments are remote comments and those as sent over to you via the API so you're statement confuses me a bit. I guess since I haven't heard and great out-cry from our users they either aren't being throw errors, or if they are they're trying to post the comment again, or don't care.
    Posted:   
    ReplyDirect LinkRemoveEdit

    Visit Kevin Fielding's profile
    285 Posts
    gadgeteer said:
    ok, but most, if not all, of our comments are remote comments and those as sent over to you via the API so you're statement confuses me a bit. I guess since I haven't heard and great out-cry from our users they either aren't being throw errors, or if they are they're trying to post the comment again, or don't care.
    Sorry for the confusion, my point is as you state it.  While there is a risk of errors with remote commenting in this timeframe, errors would be intermittent and the usage is generally so low at this time the impact to your users should be minimal currently.  Since you haven't heard a great outcry this would seem to indicate your users are not regularly encounting errors, so disabling commenting altogether seems like a bit too extreme a solution to a relatively minimal issue.
    Posted:   
    Project Manager at ThePort Network.


    Block signature
    ReplyDirect LinkRemoveEdit