我有一个大问题,我不知道如何解决它:
在 shared< g class =" gr_ gr_19 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep"数据-GR-ID =" 19 QUOT; ID = QUOT 19 QUOT;>窗户< / g取代;网络托管有很多< g class =" gr_ gr_24 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace"数据-GR-ID =" 24英寸; ID = QUOT; 24英寸;> ASP< / g取代;和< g class =" gr_ gr_23 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling"数据-GR-ID =" 23" id =" 23"> aspx< / g>访问MySql的页面(包括VB .NET,都是VBScript),我找不到我没有关闭数据库连接的地方。 这会导致大量的同步幻像达到服务器强加的连接限制的连接会阻止我对数据库的访问。 :( $ 如果找到写得不好的代码怎么办?感谢所有人回复我。
解决方案
首先请清理你的帖子,因为它几乎不可能阅读。我能读到的是你在一个应用程序中有一个或有多个连接。这是非常不明智的,您需要在需要时创建连接,使用它,关闭它。
您需要做的是重新考虑如何进行连接。
I have a big problem and I do not know how to solve it:
In a shared <g class="gr_ gr_19 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" data-gr-id="19" id="19">windows</g> web hostingwith a lot of <g class="gr_ gr_24 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" data-gr-id="24" id="24">asp</g> and <g class="gr_ gr_23 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="23" id="23">aspx</g> pages accessing MySql (both VB .NET, both VBScript) and I cannot find where I do not close the connection to the database. This causes a lot of simultaneous phantoms connections that, reaching the connections limit imposed by the server, block my access to the database. :( What can I do to find the badly written code? Thanks to all will reply to me.
解决方案First off please clean up your post as it's nearly impossible to read. What I could read is you have a single or have multiple connections in a app. This is very unwise, you need to create the connection when needed, use it, close it.
What you need to do is rethink how you are doing connections.
更多推荐
Vb .NET和MySql连接没有关闭......为什么?
发布评论