How long can a train block a railroad crossing?
The Federal Government has no restriction on blocked crossings. Individual States can have policy and fines for blocked crossings but many do not. Reference:
Model Traffic Ordinance Section 300.360 states that is unlawful for a train to prevent the use of any street for purposes of travel for a period of time longer than five minutes; except this does not apply to a moving train or to one stopped because of an emergency or for repairs necessary before it can proceed safely.