I submitted a paper to a journal, and I suspect that it is handled too slowly.
How can I decide whether my suspicion is correct? What handling times should I expect?
Given some expected handling times, when should I act? How much leeway should I give?
How should I act? Whom should I contact and what should I (roughly) write?
Note that I am interested on how I should approach this situation in general, and do not seek specific numbers for my specific situation. I am therefore looking for general answers that are independent of such factors as the field or individual journal (but mention them if they are relevant factors).
This is a canonical question on this topic as per this meta post. Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.