Having contractions

Having contractions been having them since around 2am and had six in a hour do I need to go to er?? I'm 31 weeks