In the compartment for the chain on the bow, there is always a certain amount of water. It's not small, about 5 cm. Water drain holes are located above the bottom and water cannot leak out. So one part of the chain is in the water practically all the time.
Do you also have water drain holes above the bottom of the compartment?
The chain started to rust, even though it seems more to me the part that is closer to the anchor, is the cause of this standing in the water?
What can I do?
We simply filled up the space up to the drain hole with liquid epoxy.
The space below the drain holes is there for a purpose - it helps the drain holes stay clear should the bottom of the locker fill up with mud, sand etc from the chain. Some people put a riece of plastic mesh in there to keep the chain off the bottom and out of the water.
As symphony said. Also, one hole is higher than the other so that if one blocks the other should still allow drainage.