how much melatonin is too much?

i have major sleep problems so i bought melatonin gummies but they don’t work. the recommended dosage is 1-5mgs but i’ve taken 10mgs and it doesn’t make me tired in the slightest. i’m wanting to try 20mgs but i don’t want to take too much. does anyone know the answer to this?