Raised This Month: $ Target: $400
 0% 

MySQL


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 06-11-2012 , 13:49   MySQL
Reply With Quote #1

How can I close the connection when map change?
kramesa is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 06-11-2012 , 14:25   Re: MySQL
Reply With Quote #2

http://www.amxmodx.org/funcwiki.php?go=func&id=1097
or if youre using dbi http://www.amxmodx.org/funcwiki.php?go=func&id=414

use them in public plugin_end ()
jimaway is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 06-12-2012 , 15:38   Re: MySQL
Reply With Quote #3

Ok, thanks! But its possible pause the plugin when map change and unpause after?

Last edited by kramesa; 06-12-2012 at 15:39.
kramesa is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-12-2012 , 15:39   Re: MySQL
Reply With Quote #4

Show your code. You could have some connections slowing it down.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 06-12-2012 , 15:44   Re: MySQL
Reply With Quote #5

The plugin is the advanced bans sql

This problem start occurring when I change my website to other country, with slow connection

How can I solve this problem?
kramesa is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-12-2012 , 15:47   Re: MySQL
Reply With Quote #6

It's probably hanging until it connects to that server.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 06-12-2012 , 15:48   Re: MySQL
Reply With Quote #7

But have soluction to solve this? Or pause the plugin when map change
kramesa is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-12-2012 , 23:23   Re: MySQL
Reply With Quote #8

Does really ( Handle: g_hSQLTuple = SQL_MakeDbTuple( ... ) ) should be freed on plugin_end?
I don't know if is really needed. I want to avoid server crashes while changing level.

What do you think about?
Does it better to free it?
__________________

Last edited by claudiuhks; 06-12-2012 at 23:24.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-12-2012 , 23:35   Re: MySQL
Reply With Quote #9

Code:
/**  * Creates a connection information tuple.  * This tuple must be passed into connection routines.  * Freeing the tuple is not necessary, but is a good idea if you  *  create many of them.  You can cache these handles globally.  * !!NOTE!! I have seen most people think that this connects to the DB.  *   Nowhere does it say this, and in fact it does not.  It only caches  *   the connection information, the host/user/pass/etc.  *  * The optional timeout parameter specifies how long connections should wait before  * giving up.  If 0, the default (which is undefined) is used.  *  */ native Handle:SQL_MakeDbTuple(const host[], const user[], const pass[], const db[], timeout=0);
Quote:
Freeing the tuple is not necessary, but is a good idea if you create many of them.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 06-13-2012 , 16:33   Re: MySQL
Reply With Quote #10

I tried put the timeout in 5, but the server crash when change map, is not all times, but some times the server crash
kramesa is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode