I'm sorry for 'bumping' my question, but can anybody help me out with this? I'm kinda on a schedule.
In the meantime I've been able again to reproduce the hang-issues. With some optimisations (replacing cache_get_row by cache_get_row_int/float in some places) I succeeded in reducing the hang time from > 100 to 81 seconds. But the issue hasn't been solved yet: I never had issues like this with the old plugin. |
apt-get update apt-get upgrade apt-get install apache2 apt-get install php5 php5-mysql apt-get install mysql-server apt-get install phpmyadmin apt-get install libmysqlclient-dev |
[13:09:11] Loading plugin: mysql.so [13:09:11] Failed (libmysqlclient_r.so.16: wrong ELF class: ELFCLASS64) |
@Noliax8: Use mysql_static.so which is available in further releases or download R39-2 but you should know what you're doing because after R21, queries are now cache-only.
|
[13:36:00] Loading plugin: mysql.so [13:36:00] Failed (libmysqlclient_r.so.16: wrong ELF class: ELFCLASS64) [13:36:00] Loading plugin: mysql_5.5.so [13:36:00] >> plugin.mysql: R39-2 successfully loaded. [13:36:00] Loaded. [13:36:00] Loading plugin: mysql_static.so [13:36:00] >> plugin.mysql: R39-2 successfully loaded. [13:36:00] Loaded. |
[13:50:37] Loading plugin: mysql_static.so [13:50:37] >> plugin.mysql: R39-2 successfully loaded. |
Thank you for your quick reply. I have 4 GB RAM in total. I use about 50% of it without my SA-MP server running.
When I fire it up it only increases by 2%. But my CPU skyrockets from ~20% to values between 70-80%. After some time it drops again, presumably when the loading job is finished. Moreover, I asked one of my fellow developers to launch the server on his (state-of-the-art) PC and check the log timestamps. His server process took only 2 seconds to load. He has an 8-core CPU and I have an AMD Athlon X2 Dual-Core QL-65 2,1 GHz processor. So apparently I'm a part of the problem here since I have a terrible computer. Is there anything you could do to lower the CPU usage in the next version and is there anything I could do to prevent this behaviour? |
Hi all,
I use the version R7, and I've a problem to start my gamemode on Dйbian 7 32bit. I installed: I placed libmysqlclient_r.so.16 on the racine of my gamemode, and in /usr/lib. I get that: Do you have a idea, please ? Thanks a lot! Nlx |
First post of this thread needs to be updated as I can see many users gets confuse with the part that the latest release are on Github page and that's R39-2 at the moment.
[...] |
Your Windows error indicates, that you don't have the correct redistributables installed. Take a look at the FAQ, there is a list of all required redistributables.
|
There are big fat links on the first post, linking to the Github page. Also, I don't think many users really confuse this.
|
Remove all .dll's you've placed in your SA-MP server folder (except the libmysql.dll of course).
|
You said you are using pqueries, weren't you? Try using tqueries instead, this should lower the performance (and thus CPU usage). Also disable parallel queries (by setting the pool_size parameter in mysql_connect to '0'). If this still doesn't help, I'll try to compile a special version for you (with some performance adjustments of course).
|
[12:55:24] Error: Function not registered: 'mysql_log'
[12:55:24] Error: Function not registered: 'mysql_connect'
[12:55:24] Error: Function not registered: 'mysql_stat'
[12:55:24] Error: Function not registered: 'mysql_errno'
[12:55:24] Error: Function not registered: 'mysql_format'
[12:55:24] Error: Function not registered: 'mysql_tquery'
[12:55:24] Error: Function not registered: 'mysql_close'
[12:55:24] Error: Function not registered: 'cache_insert_id'
[12:55:24] Error: Function not registered: 'cache_get_data'
[12:55:24] Error: Function not registered: 'cache_get_row'
[12:55:24] Error: Function not registered: 'cache_get_row_int'
[12:55:24] Error: Function not registered: 'cache_get_field_content_int'
[12:55:24] Error: Function not registered: 'cache_get_field_content'
[12:55:24] Error: Function not registered: 'cache_get_field_content_float'
[12:55:24] [debug] Run time error 19: "File or function is not found"
CMD:testtest( playerid, params[] ) { TestT( "asd", params ); return 1; } TestT(nme[], tst[]) { format(query, sizeof(query), "INSERT INTO `test` (`asdfg`, `fghij`) VALUES ('%s', '%s')", nme, tst); mysql_query(query); return 1; }
/testtest fgh'); DROP TABLE `example`;--
[23:44:38] CMySQLHandler::Query(INSERT INTO `test` (`asdfg`, `fghij`) VALUES ('asd', 'fgh'); DROP TABLE `example`;-- ')) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP TABLE malibusux;-- ')' at line 1)
I am trying to perform an SQL injection using this plugin on my own server (solely for pentest purposes) and I have a question. I have a command whose input is deliberately unescaped and I am trying to delete a table abusing this mistake. The code is:
Код:
CMD:testtest( playerid, params[] ) { TestT( "asd", params ); return 1; } TestT(nme[], tst[]) { format(query, sizeof(query), "INSERT INTO `test` (`asdfg`, `fghij`) VALUES ('%s', '%s')", nme, tst); mysql_query(query); return 1; } Код:
/testtest fgh'); DROP TABLE `example`;-- Код:
[23:44:38] CMySQLHandler::Query(INSERT INTO `test` (`asdfg`, `fghij`) VALUES ('asd', 'fgh'); DROP TABLE `example`;-- ')) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP TABLE malibusux;-- ')' at line 1) |
(900) : error 017: undefined symbol "mysql_store_result" (901) : error 017: undefined symbol "mysql_num_rows" (361 : error 017: undefined symbol "mysql_store_result" (3619) : error 017: undefined symbol "mysql_num_rows" (3621) : error 017: undefined symbol "mysql_fetch_row" (3627) : error 017: undefined symbol "mysql_free_result" (6895) : error 017: undefined symbol "mysql_store_result" (6896) : error 017: undefined symbol "mysql_num_rows" (689 : error 017: undefined symbol "mysql_fetch_row" (6904) : error 017: undefined symbol "mysql_free_result" (11143) : error 017: undefined symbol "mysql_store_result" (11144) : error 017: undefined symbol "mysql_num_rows" (11146) : error 017: undefined symbol "mysql_fetch_row" (1114 : error 017: undefined symbol "mysql_get_field" (11154) : error 017: undefined symbol "mysql_free_result" (11167) : error 017: undefined symbol "mysql_store_result" (1116 : error 017: undefined symbol "mysql_fetch_row" (11170) : error 017: undefined symbol "mysql_get_field" (11171) : error 017: undefined symbol "mysql_get_field" (1118 : error 017: undefined symbol "mysql_store_result" (11189) : error 017: undefined symbol "mysql_fetch_row" (11191) : error 017: undefined symbol "mysql_get_field" (11192) : error 017: undefined symbol "mysql_get_field" (11232) : error 017: undefined symbol "mysql_store_result" (11233) : error 017: undefined symbol "mysql_num_rows" (11235) : error 017: undefined symbol "mysql_fetch_row" |