If so, do not submit the paper. Less active, less motivated mathematicians reported about the great pressure to publish, publish, publish. So very few people will see the work. Suppose you write a paper on a new parallel algorithm for searching. Some editors are better than others at nagging referees to finish their reviews in 3-6 months.
Some journals have a longer backlog for publication.
Some journals publish the dates of submission and revision for each paper, so you know the exact delay. Editors move, and new editors are appointed. However, it is a good habit to put these on all papers. These may be used by the editor to assign the paper to an area editor, or to assign referees. Contact the editor if you do not receive an acknowledgement in a month.