A few weeks ago I thought I was having a heart attack. My morning started out normal: I woke up at my usual hour, feeling what I thought was a little bit of tiredness. But as I went about my morning routine, things grew scary. I broke out in a cold sweat as I brushed my teeth. My skin turned white as paper. And then, scariest of all: my heart was pounding like crazy. As a health writer I know these aren’t textbook signs of a heart attack, but I also know that dangerous cardiovascular events in women can be more subtle than those in men.

Later that day I went to urgent care, but an EKG and blood tests showed nothing out of the ordinary. Turns out my heartbeat went haywire as a result of a side effect from a medication. The technical term for this: heart palpitations, which can be brought on by many things.

“When a person says they’re having heart palpitations they’re referring to a sensation of their heart beating differently. Or they may simply have an awareness of their heart beating,” explained Dr. Shephal Doshi, director of cardiac electrophysiology at Providence Saint John’s Health Center in Santa Monica, California.

Learn about some top triggers of palpitations, plus what to do about them.

Panic attacks
If you feel as if your heart is racing like it’s going to beat out of your chest, it could be a panic attack, Doshi says. Shaking, sweats, and an overwhelming feeling of impending doom are also common symptoms. Panic attacks are not dangerous, though they can feel absolutely terrifying.

“Sometimes you may have an arrhythmia [an abnormal heart rhythm caused by a disruption in the heart’s electrical signaling] that’s actually causing the panic attacks, so see a doctor to rule out something more serious,” Doshi added.

Otherwise, recurring panic attacks can be treated with talk therapy to identify triggers and anti-anxiety medications.

RELATED: 12 Signs You May Have an Anxiety Disorder

Caffeine
So your heart’s beating faster than normal. Before you start worrying, did you just have a big cup of Joe?

“Caffeine is a stimulant,” said Dr. Brian Kolski, an interventional cardiologist with St. Joseph Hospital in Orange, California.

This means that it “stimulates the autonomic nervous system (the involuntary nervous system which controls heart rate and more), which can cause an increase in palpitations.” Kolski recommends seeing your doctor if palpitations become excessive or are accompanied by dizziness, lightheadedness, or chest pain—even if you suspect it’s caused by caffeine.

RELATED: 12 Surprising Sources of Caffeine

Decongestants
Decongestants such as pseudoephedrine (the active ingredient in Sudafed) are also stimulants.

“Some people who may be sensitive to these drugs can experience heart palpitations,” added Doshi.

Over-the-counter meds are usually safe, but you should talk to your doctor or pharmacist if you have any other medical conditions. If you have a heart arrhythmia, for example, your doctor may advise against taking certain decongestants, Doshi said.

Dehydration
Losing too much fluid, not drinking enough, or a combination of the two can quickly lead to dehydration, which, when severe, can lead to heart palpitations along with dry mouth, dark urine, and muscle cramping.

“Dehydration can cause changes in your body’s electrolytes and also lowers blood pressure,” Doshi said. “This puts stress on the body and, as a result, could cause an abnormal heartbeat.”

Prevent it with regular trips to the water cooler—your body needs 2.2 liters (or about nine cups of fluid) every day to function properly, per the Institute of Medicine.

RELATED: 7 Easy Ways to Drink More Water

Prescription meds
Many prescription medications, including those for asthma or thyroid problems, can cause palpitations, Kolski said. “Some medications affect how other medications are metabolized, while others cause changes in the electrical conduction system of the heart.”

These heartbeat changes aren’t normally a cause for alarm, but they can be bothersome. Make sure your doctor knows about every drug or supplement you’re taking before you start any new medications. Also, pay close attention to the possible side effects listed on the drug information that comes with your medicine when you pick it up from the pharmacy, so you won’t freak out if it happens. If your regular medicines are messing with your heartbeat day-to-day, talk to your doctor to see if there’s a different drug that might work better for you.

RELATED: 19 Signs Your Thyroid Isn’t Working Right

Anemia
Most commonly caused by iron deficiency, anemia means your body isn’t making enough healthy red blood cells to carry adequate oxygen to your tissues. Although it doesn’t always cause heart palpitations, people with anemia may sometimes feel their heart beating harder, Kolski said. “Since you have fewer red blood cells, a faster heart beat increases oxygen delivery when you’re anemic.” Other symptoms include fatigue and hair loss.

RELATED: 15 Signs You May Have an Iron Deficiency

Heavy metals
People who work in construction, as metal workers, or in other industrial settings can be exposed to mercury, cadmium, and other heavy metals regularly. Long-term exposure can lead to inflammation, blood clots (thrombosis), and other heart-related problems. “Heavy metal exposure can be directly toxic to heart muscle,” Kolski said. “[It] can also cause problems with electrolytes. Anything that causes a derangement in electrolytes can cause heart palpitations.”

In general, heart symptoms should never be taken lightly; if you ever feel like something’s up with your ticker, see a doctor ASAP (in the ER or an urgent care center) for a full evaluation.

This article originally appeared on Health.com.