Hi so a week ago i started getting this issue.
I've had DSL-520B ADSL modems installed in two different locations for several years. Considering your internet connection was working fine before the trouble started, here are several things you should check, in the order of likely cause:
1. Using a multi-meter, check the voltage output of the power supply. Based on my personal experience, these things have an unnaturally high failure rate. The output should be dead-on 12V and not fluctuating. I've had cases where the output voltage has dropped to 9 or 10V, or started to fluctuate between 10 and 12V, and in both cases the modem continued to operate correctly for short periods of time. The power supplies have been a problem for some time now, and for a while you couldn't even get OEM replacements from D-Link. Then the modems became scarce as well, to the point where it looked like D-Link was preparing to discontinue them. Last Fall a new supply appeared on the market, and I've since purchased three. The new ones are Hardware Version T2, and come with a new style power supply. If you find that the power supply has failed, you can purchase a universal power with the correct voltage and polarity (e.g., from Amazon). I've done this at one location with one which has a secondary 5V USB output, which is used to power a Raspberry Pi running PiHole. Your other option is to simply buy another DSL-520L modem (see below).
2. The next likely cause of your problem is that the modem itself has started to fail. I've had three modems fail in the past two years. My impression is that they only last four or five years. The usual symptoms have been precisely what you're seeing; they work fine until they don't - reset and repeat. I haven't found any way to determine if a modem has failed, other than to swap it out for a known good one. So once again, I suggest you buy a another DSL-520L modem. In addition to giving you a known working modem for the purposes of troubleshooting, it will act as a spare. If you're planning to have DSL for the foreseeable future, trust me, you'll need a spare. I now keep configured spare modems and routers at both locations.
3. Try to determine if your phone line has become noisy. This can either be due to a changes inside or outside your home. Disconnect EVERYTHING from your phone line except for one phone. Have a good listen; if you hear ANY crackling over the dial tone, that's a problem. Service providers have specially maintained "silent" lines that their repair staff can call to check the quality of a line. These numbers are not published, but you might be able to fine one listed on the internet. There's lots of good information on the internet for troubleshooting phone lines. If you've made ANY changes in your home (i.e., repairs or renovations), double check that they haven't affected your phone line. Only after you're convinced that the problem is due to line quality, and that it's OUTSIDE your home, should you call your service provider.
4. Does the problem only occur at a particular time of day? Cheap dimmers and timers can transmit noise over your home's electrical system, which WILL affect your DSL connection. At my summer residence I have a pair of carriage lights installed on the outside of the garage. These lights have a built-in dimmer/timer which allow the lights to come on automatically at dusk, and stay on for a number of hours. They also dim after a few minutes, if they don't sense motion. Initially I had "good old fashion" incandescent bulbs installed in these lights. Shortly after replacing these with "cheap" LED bulbs I started to have problems with my DSL connection. I was finding that my previously good DSL connection (no problem streaming video) was slowing in the evening (continuous buffering while streaming video). Initially I thought that my service provider had finally over sold the service in the area (small village of 400 families using 256 DSL connects). It took me nearly 3 months to realize it was the damn carriage lights, and only after I'd read a story on the internet about someone's DSL connection being affected by the dimmer on their neighbours porch lights. As soon as I swapped back the incandescent bulbs, the problem disappeared. I now have top quality dimmable LED bulbs installed in these lights. So, have you recently installed any new dimmers, timers or other electrical equipment or appliances which could be creating noise on your home's electrical system?
If you've exhausted all of the above possibilities, call your DSL provider and have them check out your service. At this point it's likely that the problem is at their end.
Hope this helps,
Larry ....