edit-task
Home
Up
Delete
Task Name:
Task Description:
] # # - FIX-PRB-7140 - user ### has exceeded max user connections (10),
TaskGroup ID:
Start Date:
Start Time:
Duration:
Priority:
Status:
To Do
Completed
In Process
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">PROBLEM TO SOLUTION</h1> <h1 style="text-align: center;">FIX-PRB# 7140</h1> <h1 style="text-align: center;">max user connections exceeded</h1> <ol> <li><strong>TITLE =</strong></li> <ol> <li>'PRB-PG-*.*' </li> </ol> <li><strong>DESC =</strong></li> <ol> <li>WHEN='click {random page}' RESULT='error msg', msg='max user connections exceeded (limit=10)',</li> <li>] ERROR - PAGE search/tasks, search = id=7128, PG view/tasks ERROR </li> <li>] flush mysql </li> <li>] g?='mysql tracking connections' </li> </ol> <li><strong>[WHERE]</strong></li> <ol> <li>] ON PG = 'random'</li> </ol> <li><strong>[WHEN]</strong></li> <ol> <li>] ON PG loads</li> </ol> <li><strong>[WHAT.HAPPENS.WHEN]</strong></li> <ol> <li>x] ERROR MSG = 'max user connections exceeded (limit=10)'</li> <li>x] ERROR MSG DETAILS ='see file' for extended details</li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[CAUSE.SUSPECT]</strong></span></li> <ol> <li><span style="background-color: #c0c0c0;">x] = might be something to do with having too many 'user_connections' ??? /s</span></li> <li><span style="background-color: #c0c0c0;">x] APP is leaving db connections open, </span></li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[TRY =]</strong></span></li> <ol> <li><span style="background-color: #c0c0c0;">]</span></li> <li><span style="background-color: #c0c0c0;"><strong>[TEST=]</strong></span></li> <ol> <li><span style="background-color: #c0c0c0;">] ...</span></li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[RESULT=]</strong></span></li> <ol> <li><span style="background-color: #c0c0c0;">] ...</span></li> </ol></ol> <li><span style="background-color: #c0c0c0;"><strong>[RESOLUTION=]</strong></span></li> <ol> <li><span style="background-color: #c0c0c0;">x] increased connections limit from:10 to:20</span></li> <li><span style="background-color: #c0c0c0;">i] added explicit db close, db connection close, db dispose to *.cs files</span></li> <li><span style="background-color: #c0c0c0;">i] added using statement to /qry files </span></li> <li><span style="background-color: #c0c0c0;">x*] /new = REM call to getPath() method which opens ... for each </span></li> <li><span style="background-color: #c0c0c0;">x] User.cs = REM tracking db property </span></li> <li><span style="background-color: #c0c0c0;">x] update web.config for app .org to use seperate/different db user connection VS same as .com </span></li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[STATUS]</strong></span></li> <ol> <li><span style="background-color: #c0c0c0;">] RESOLVED, ] Pending,i] Working</span></li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[OTHER]</strong></span></li> <ol> <li><span style="background-color: #c0c0c0;">x] openDate:2017-03-16</span></li> <li><span style="background-color: #c0c0c0;">x] openBy:don.sagrott</span></li> <li><span style="background-color: #c0c0c0;">i] startDate:2017-03-16</span></li> <li><span style="background-color: #c0c0c0;">] completeDate:</span></li> <li><span style="background-color: #c0c0c0;">] owner: don.sagrott</span></li> <li><span style="background-color: #c0c0c0;">] time:*&^%##</span></li> </ol></ol> <h2>[previously]</h2> <ol> <li><span style="background-color: #c0c0c0;"><strong>[2017-03-15][00:00] NEW task IN ?</strong></span></li> <ol> <li>x] # 7140 - CREATE-article# # - <a href="/view/task?id=7140" target="_blank">FIX-PRB-7140</a> - max-user-connections-exceeded</li> </ol> <li><strong>[00:00] NEW article IN </strong></li> <ol> <li>x] # # -</li> </ol> <li><strong>[00:00] NEW task IN REFERENCE</strong></li> <ol> <li>x] # 7125 - MIGRATION-steps-all ( CC ) </li> </ol> <li><strong>[00:00] NEW task IN TRY</strong></li> <ol> <li>x] SET GLOBAL max_user_connections=100; </li> <li>x] RESULT=FAIL - need 'super' permissions</li> </ol> <li><strong>[00:00] NEW task IN RESEARCH</strong></li> <ol> <li>] research g?='asp.net close connection'</li> <li>] + BM stack </li> <li>] + BM codeproject </li> <li>] show global variables like '%connections%'; </li> <li>] HOST - arvixe = max_user_connections = 0, max_connnections = 450 </li> <li>] HOST - smarter - max_user_connections = 10, max = 1000, </li> <li>] show status like '%onn%'; </li> </ol> <li><strong>[00:00] NEW task</strong></li> <ol> <li>x] # 7141 - <a href="/view/task?id=7141" target="_blank">TRANSCRIPT-SUPPORT-chat</a> (or lack there-of) x] AGENT:Bob SUGGESTS: x] <span style="text-decoration: underline;">document-flush connections</span>, x] submit a ticket </li> <li>*] flushing connections will (usually/sometimes) clear issue for period of time</li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[2017-03-dd][00:00] NEW task</strong></span></li> <ol> <li>x] # # - SUPPORT-email </li> <li><strong><span style="background-color: #00ff00;">x] # # - max_user_connections increased to 20</span></strong></li> <li>x] # # - UPD - support ticket - response, connections limit has been increased from:10 to: 20 </li> </ol> <li><strong>[00:00] NEW task IN TRY</strong></li> <ol> <li><span style="background-color: #00ff00;"><strong>i] ADD explicit {db}.connection.close, {db}.close statements to class code, </strong></span></li> <li>] EX - db.Connection.Close()</li> <li>] EX - db.Close()</li> <li>] LIST = x] Calendar, x] Plan, x] User, x] Task, x] TaskGroup </li> <li>] ERROR stack trace - 'Plan.cs' - line 137 ish</li> <li>] BM - article - on properly closing connections </li> <li> ** MU = webmatrix database helper should close connections</li> <li>i] review add/task - classes in use before</li> <li>] _App - </li> </ol> <li><strong>[00:00] NEW task IN TEST</strong></li> <ol> <li>x] # # - TEST = </li> <li>x] PASS - ADD task, </li> <li>x] PASS - view pages(l1 - libraries, warehouses, ...), </li> <li>x] PASS - EDIT task</li> <li>] FAIL = view/new - scrolling back (x) pages, will eventually get you a maxed connection, </li> <li><span style="background-color: #ffff99;">] AKA its better, BUT its NOT FIXED</span></li> </ol> <li><strong><span style="background-color: #c0c0c0;">[2017-04-05]>[00:00] NEW task IN </span></strong></li> <ol> <li>] # # - Library.cs - adding explicit close connection, close db calls to each method where db is invoked</li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[2017-04-10]</strong><strong>[00:00] NEW task IN UPDATES</strong></span></li> <ol> <li>x] # # - code updates to subjects library classes </li> <li>x] # 1725 Library, x] # 1726 Book, x] # 1727 Chapter and x] # 1728 Article classes, </li> <li>x] adding explicit connection close, db close statement</li> </ol> <li><strong>[00:00] NEW task IN TEST</strong></li> <ol> <li>] # # - RESULT=FAIL doesn't appear to be making much of/any difference</li> </ol> <li><strong>[00:00] NEW task IN TRY </strong></li> <ol> <li><strong>x] use mysql workbench to ts sleeping connections</strong></li> <li>x] # # - setup connection to remote db, db = .org , usr=default (not dataed)</li> <li>*] server status - shows connections, i dont think thats max user </li> <li>*] show processlist</li> <li>*] show status like '%onn%'</li> <li>] TEST = </li> <li>] RESULT = </li> </ol> <li><strong>[00:00] NEW task IN TRY</strong></li> <ol> <li><strong>] # # - ADD explicit "db.Dispose(); statement to Article.cs</strong></li> <li>x] TEST = view/new - </li> <li>x] RESULT = FAIL still crapping out in about the same area, MAR-28</li> </ol> <li><strong>[00:00] NEW task IN TRY</strong></li> <ol> <li>x] # # - clear browser cache - (are error pages cached, is this why its breaking at the same point)</li> <li><strong>x] TEST = </strong></li> <li>x] RESULT = FAIL</li> </ol> <li><strong>> [00:00] NEW task IN TRY</strong></li> <ol> <li> <strong>x] maybe other classes in use are, other classes = ] User, ] _app </strong></li> <li>x] ADD db close.conn, db close, db dispose statements to User.cs</li> <li>*] BUT user isnt the PRB BC this is different DB</li> <li>x] _App isnt the PRB BC it doesnt make any DB calls</li> <li><strong>x] TEST = same </strong></li> <li>x] RESULT=FAIL, aka no change</li> </ol> <li><span style="background-color: #ffffff;"><strong>[00:00] NEW task IN TRY</strong></span></li> <ol> <li><span style="background-color: #00ff00;"><strong>x] REM call to this method(getPath()) on PAGE "new" returned items</strong></span></li> <li>x] I have a method call getPath() that returns the full path name for an article, but it opens new Library, Book, Chapter for each record in returned articles set</li> </ol> <li><strong>[00:00] NEW task IN TEST</strong></li> <ol> <li>x] TEST = same, RESULT = pass </li> </ol> <li><strong>[00:00] NEW task IN TRY</strong></li> <ol> <li><strong>x] adding explicit db.Dispose(); </strong></li> <li>x] # # - code updates to subjects library classes ] # 1725 Library, ] # 1726 Book, ] # 1727 Chapter and ] # 1728 Article classes, </li> </ol> <li><strong>[00:00] NEW task IN TEST</strong></li> <ol> <li>x] # # - TEST = view/new from today, navigate back - RESULT = FAIL still crapping out in the exact same area, MAR-28</li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[2017-04-10]>[00:00] NEW task IN /5545-migration</strong></span></li> <ol> <li>i] use mysql wkbench to TS </li> <li>i] explicitly db.closeConnection() </li> <li>i] explicitly db.close(), </li> <li>i] exlicitly dispose() db </li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[2017-04-13][00:00] NEW task</strong></span></li> <ol> <li>] # # - open support ticket# 2 - again experiencing issues, 150+ sessions, </li> <li>] add/task </li> </ol> <li><strong>[2017-04-dd][00:00] NEW task </strong></li> <ol> <li>x] # 1972 User.cs - </li> <li><strong><span style="background-color: #00ff00;">x] REM tracking db property - EVERY user was getting a connection to our 'tracking/loggin' db, BUT it isnt being used </span></strong></li> <li>x] REM logVisit() method, </li> <li>*] PREV added ] close db, ] close conn, ] dispose db to class methods</li> <li>x] TEST = walkback thru 'new today', </li> <li>x] RESULT=PASS, </li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[2017-04-23]>[00:00] NEW task IN </strong></span></li> <ol> <li>i] USING add/article - PRB errors, @80 users </li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[2017-04-24][00:00] NEW task IN </strong></span></li> <ol> <li><strong><span style="background-color: #00ff00;">x] qry/{* files} - TRY 'using db' statement vs db open to auto close, database conn</span></strong></li> <li>x] FILES = /qry/articles(3), x] /qry/tasks(3), x] /qry/items(3), x] /qry/places(3), x] /qry/people(3), x] systems(3)</li> <li>x] 3 files each, based file specified in _App.cs, where </li> <li>x] TEST - x] articles, x] tasks, x] items, x] places, x] people, x] systems</li> <li>*] on PG add/article, add/..., SELECT 3 dropdowns, sospephelpers function, _App object props ( = filenames to /qry files, which execute queries, return result set)</li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[2017-04-25][00:00] UPDATE task</strong></span></li> <ol> <li>x] 300 online, NOT getting hardly any errors, </li> <li>x] TEST = adding task, x] adding article, x] edits </li> <li><span style="background-color: #ffff99;">x] ERROR - add book - using option default chapters - auto adds chapter, ( x] ADDED next=)</span></li> </ol> <li><span style="background-color: #c0c0c0;"><strong>[2017-04-28][00:00] NEW task IN </strong></span></li> <ol> <li>x] again errors, w < 100 users online</li> <li><strong><span style="background-color: #00ff00;">x] assign different db user to conn string for .org VS .com, </span></strong></li> <li>x] local .org/web.config settings aligned with remote, </li> <li>x] fix conn string for db-{user=e***} </li> <li>+] migration-notes.txt</li> <li>x] TEST = /view/..., /add/task, /add/article, </li> <li>x] RESULT = pass</li> </ol> <li><strong>[2017-05-20] NEW task IN</strong></li> <ol> <li>[x] FIX-PRB-7325 - Ticket ID 939275, max_user_connections REQUEST increase to 20 on all current dbs, 2017-05-20</li> <li>[x] Ticket ID 939275 </li> <li>[x] Can you please set the max_user_connections for the following databases to 20. </li> <li>[x] ADD this.task to 7140</li> <li>[x] SRC = FIX-PRB-7325, reuse as new</li> </ol> <li><strong>[2017-12-21][17:15] NEW task IN ?</strong></li> <ol> <li>] # # - CREATE-article# # - task = F I max_use_connections</li> <li>] 2017-12-21</li> <li>x] previously used "using db' VS open db in ?classes?, this 'seemed to' 'resolve' the issue with max_user connections </li> <li>x] dont seem to be able to find any documentation or notes on it</li> <li>x] wait I do HAVE some ' notes' in id= 7140, item # 25 on 2017-04-24 </li> <li>x] BUT i still dont seem to be able to find 'code' example/sample that i implmented</li> </ol></ol> <div><strong><br /></strong></div> <h2>[currently]</h2> <div><ol> <li><strong>[00:00] NEW task </strong></li> <ol> <li>]</li> </ol> <li><strong>[00:00] NEW article IN </strong></li> <ol> <li>] # # -</li> </ol> <li><span style="background-color: #ffff00;"><strong>[00:00] NEW task IN TRY ** SOLUTION **</strong></span></li> <ol> <li><span style="background-color: #ffff00;">] # # - ADD wrap "db call in using statement", connections will then be automatically closed and disposed of</span></li> </ol></ol></div> <h2>[next]</h2> <ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>] # # - COPY revised ] E task, TaskGroup, Plan, Calendar class files to s .org</li> </ol> <li><strong>[00:00] NEW task IN </strong></li> <ol> <li>] # # - COPY revised ] S Article, Book, Chapter, Library class files to s .org</li> </ol> <li><strong>[00:00] NEW task IN REWRITE</strong></li> <ol> <li>] # # - O Item, ...</li> <li>] # # - Y Step, ...</li> <li>] # # - P Person, ...</li> <li>] # # - L Place, ... </li> </ol> <li><strong>[2017-04-23][00:00] NEW task IN</strong></li> <ol> <li>] review all /qry files, ] explicitly close db connections</li> </ol> <li><strong><strong>[2017-04-23]</strong>>[00:00] NEW task IN </strong></li> <ol> <li>] # # - FIX-PRB-Nnnn - </li> <li>] ERROR - add book - using option default chapters - auto adds chapter, article records, before ERROR, ADDs book, chapter contents, chapter index, article contents, THEN ERROR before article index</li> <li>] Book.CS - method </li> </ol></ol> <h2>[reference]</h2> <ol> <li>] https://forums.asp.net/t/1847019.aspx?Closing+a+database+in+WebMatrix </li> <li>] https://major.io/2007/05/20/mysql-connections-in-sleep-state/</li> </ol> <p> </p> <p> </p> <h2 style="font-family: Verdana; font-weight: normal; font-size: 14pt; color: maroon;"><em>User 'db******ed' has exceeded the 'max_user_connections' resource (current value: 20)</em></h2> <p><span style="font-size: 11.199999809265137px; font-family: Arial, Helvetica, Geneva, SunSans-Regular, sans-serif;"><strong style="font-family: Verdana; margin-top: -5px;">Description: </strong>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br /><br /><strong style="font-family: Verdana; margin-top: -5px;">Exception Details: </strong>MySql.Data.MySqlClient.MySqlException: User 'db_a19eea_dataed' has exceeded the 'max_user_connections' resource (current value: 20)<br /><br /><strong style="font-family: Verdana; margin-top: -5px;">Source Error:</strong> <br /><br /></span></p> <table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td> <pre style="font-family: Consolas, 'Lucida Console', monospace; font-size: 11pt; margin: 0px; padding: 0.5em; line-height: 14pt;">Line 57: Line 58: public Library(int id_library){ <span style="color: red;">Line 59: var x = sospep.QuerySingle(qryGetLibrary,id_library); </span>Line 60: this.id_library = x.id_library; Line 61: this.name_library = x.name_library;</pre> </td> </tr> </tbody> </table> <p> </p> <div> </div> <div> </div>