News:

Wondering if this will always be free?  See why free is better.

Main Menu

ENotify

Started by SMFHacks.com Team, October 18, 2009, 04:40:06 PM

Previous topic - Next topic

luuuciano

Quote from: sah62 on January 29, 2014, 01:42:01 PM
I'm seeing a number of entries in my MySQL slow query log from actions performed by ENotify. Here's an example (with some server-specific information modified for privacy reasons):


# Time: 140129 12:41:12
# User@Host: db1[db1] @ localhost []
# Query_time: 1.944887  Lock_time: 0.000139 Rows_sent: 0  Rows_examined: 0
SET timestamp=1391017272;
INSERT IGNORE INTO smf_log_enotify_replies(`enot_item_id`, `enot_title`, `enot_time`, `enot_link`, `enot_sender`, `enot_sender_link`, `id_member`)
                VALUES
                        (66972, SUBSTRING('Re: Subject', 1, 255), 1224716956, 'http://www.myserver.org/forum/index.php?topic=11234.msg66972;topicseen#msg66972', SUBSTRING('user', 1, 255), 'http://www.myserver.org/forum/index.php?action=profile;u=101', 251);


Is there any reason these queries should be taking longer than 1 second to execute?

sah62, I have no idea, sorry...
But... how do you do that log?

(to see what interesting things we have in the forum...)
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

sah62

Quote from: luuuciano on January 29, 2014, 01:53:10 PM
sah62, I have no idea... but... how do you do that log?

(to see what interesting things we have in the forum...)

Add entries like these to /etc/mysql/my.cnf:


long_query_time=1
slow_query_log=1
slow_query_log_file=/var/log/mysql/log-slow-queries.log


The location of your my.cnf file may vary...

live627

Quote from: sah62 on January 29, 2014, 01:42:01 PM
I'm seeing a number of entries in my MySQL slow query log from actions performed by ENotify. Here's an example (with some server-specific information modified for privacy reasons):


# Time: 140129 12:41:12
# User@Host: db1[db1] @ localhost []
# Query_time: 1.944887  Lock_time: 0.000139 Rows_sent: 0  Rows_examined: 0
SET timestamp=1391017272;
INSERT IGNORE INTO smf_log_enotify_replies(`enot_item_id`, `enot_title`, `enot_time`, `enot_link`, `enot_sender`, `enot_sender_link`, `id_member`)
                VALUES
                        (66972, SUBSTRING('Re: Subject', 1, 255), 1224716956, 'http://www.myserver.org/forum/index.php?topic=11234.msg66972;topicseen#msg66972', SUBSTRING('user', 1, 255), 'http://www.myserver.org/forum/index.php?action=profile;u=101', 251);


Is there any reason these queries should be taking longer than 1 second to execute?
Queries get slower on bigger tables.

sah62

Quote from: live627 on January 29, 2014, 06:45:54 PMQueries get slower on bigger tables.

I see 441 rows in my database right now. Is that really that big?

Arantor

No, but the way the table works is that it's constantly being read and reads are table locking so no writes can occur.

You should probably change that table to InnoDB.

luuuciano

Quote from: sah62 on January 29, 2014, 01:56:19 PM
Add entries like these to /etc/mysql/my.cnf:


long_query_time=1
slow_query_log=1
slow_query_log_file=/var/log/mysql/log-slow-queries.log


The location of your my.cnf file may vary...

Thanks a lot! will try it
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).


Arantor

Wait, what?

1.9 seconds for that table would be quite legitimate on a MyISAM table because of table locking, but I really don't see how that table is bound to blocking an insert for almost 2 seconds on an InnoDB table.

sah62

Right, and that's why I'm asking.  I just recently installed ENotify and these are the only slow queries I'm seeing logged. I don't see an obvious problem, but the query times are what they are. Is there any other info I can share to provide more detail?

butch2k

Quote from: Sir Cumber-Patcher on January 29, 2014, 08:01:01 PM
Wait, what?

1.9 seconds for that table would be quite legitimate on a MyISAM table because of table locking, but I really don't see how that table is bound to blocking an insert for almost 2 seconds on an InnoDB table.
The lock is quite fast, it's the fsync which is probably taking some time. Could you check your innodb settings and post them here ? i suspect innodb is configured to fsync on every write.

sah62

InnoDB settings:


mysql> show variables like 'inno%';
+---------------------------------+------------------------+
| Variable_name                   | Value                  |
+---------------------------------+------------------------+
| innodb_adaptive_flushing        | ON                     |
| innodb_adaptive_hash_index      | ON                     |
| innodb_additional_mem_pool_size | 8388608                |
| innodb_autoextend_increment     | 8                      |
| innodb_autoinc_lock_mode        | 1                      |
| innodb_buffer_pool_instances    | 1                      |
| innodb_buffer_pool_size         | 134217728              |
| innodb_change_buffering         | all                    |
| innodb_checksums                | ON                     |
| innodb_commit_concurrency       | 0                      |
| innodb_concurrency_tickets      | 500                    |
| innodb_data_file_path           | ibdata1:10M:autoextend |
| innodb_data_home_dir            |                        |
| innodb_doublewrite              | ON                     |
| innodb_fast_shutdown            | 1                      |
| innodb_file_format              | Antelope               |
| innodb_file_format_check        | ON                     |
| innodb_file_format_max          | Antelope               |
| innodb_file_per_table           | OFF                    |
| innodb_flush_log_at_trx_commit  | 1                      |
| innodb_flush_method             |                        |
| innodb_force_load_corrupted     | OFF                    |
| innodb_force_recovery           | 0                      |
| innodb_io_capacity              | 200                    |
| innodb_large_prefix             | OFF                    |
| innodb_lock_wait_timeout        | 50                     |
| innodb_locks_unsafe_for_binlog  | OFF                    |
| innodb_log_buffer_size          | 8388608                |
| innodb_log_file_size            | 5242880                |
| innodb_log_files_in_group       | 2                      |
| innodb_log_group_home_dir       | ./                     |
| innodb_max_dirty_pages_pct      | 75                     |
| innodb_max_purge_lag            | 0                      |
| innodb_mirrored_log_groups      | 1                      |
| innodb_old_blocks_pct           | 37                     |
| innodb_old_blocks_time          | 0                      |
| innodb_open_files               | 300                    |
| innodb_print_all_deadlocks      | OFF                    |
| innodb_purge_batch_size         | 20                     |
| innodb_purge_threads            | 0                      |
| innodb_random_read_ahead        | OFF                    |
| innodb_read_ahead_threshold     | 56                     |
| innodb_read_io_threads          | 4                      |
| innodb_replication_delay        | 0                      |
| innodb_rollback_on_timeout      | OFF                    |
| innodb_rollback_segments        | 128                    |
| innodb_spin_wait_delay          | 6                      |
| innodb_stats_method             | nulls_equal            |
| innodb_stats_on_metadata        | ON                     |
| innodb_stats_sample_pages       | 8                      |
| innodb_strict_mode              | OFF                    |
| innodb_support_xa               | ON                     |
| innodb_sync_spin_loops          | 30                     |
| innodb_table_locks              | ON                     |
| innodb_thread_concurrency       | 0                      |
| innodb_thread_sleep_delay       | 10000                  |
| innodb_use_native_aio           | OFF                    |
| innodb_use_sys_malloc           | ON                     |
| innodb_version                  | 5.5.35                 |
| innodb_write_io_threads         | 4                      |
+---------------------------------+------------------------+
60 rows in set (0.00 sec)

mysql>

GamePersia


Arantor


butch2k

@Sah62
Set innodb_flush_log_at_trx_commit  to 2 it will fix your issue.
If you don't use binlogs set innodb_support_xa to OFF as well.

sah62

Quote from: butch2k on February 06, 2014, 07:06:17 AM
@Sah62
Set innodb_flush_log_at_trx_commit  to 2 it will fix your issue.
If you don't use binlogs set innodb_support_xa to OFF as well.

@butch2k: thanks, that seems to have done the trick. I haven't seen any slow queries since making those changes.

hd00842

hi, I'm using the SMF 2.0 RC1.2, the log errors system report the thousands of line:

live627

SMF 2.0 RC1.2 is unsupported and has many security holes. Upgrade immediately!!

GHarper

Hi, is there a way to make this compatible with Crip's Blackrain V3 theme? I'm currently on SMF 2.0.8. I'd love to use this mod but I'm not competent enough at coding to do it myself  :P.

Thanks,
Greg

vbgamer45

Do you get an error on install on other themes when you try?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

GHarper

No, I have not tried to install it yet due to SMF recommending that I not install it, as several processes are not able to be completed.

Advertisement: