Germany migrants
Refugees walk past the gate bearing the logo of the German Red Cross at a shelter for asylum-seekers ahead of the visit by German Chancellor Angela Merkel in Heidenau, eastern Germany on August 26, 2015. Merkel visits the refugee centre hit by violent far-right protests, a day after Berlin said it had eased some asylum rules as thousands more migrants pour into Europe seeking refuge. Getty Images/Tobias Schwarz

BERLIN (Reuters) - Germany's government plans to double funding this year to help towns cope with record numbers of refugees, moving to tackle an issue that is straining resources and fuelling social tensions.

With refugee shelters in the country being attacked almost daily and politicians warning of a rise in xenophobia, Chancellor Angela Merkel's cabinet agreed a draft law to bring forward the transfer of 500 million euros ($575 million) originally intended for 2016.

Germany, the biggest recipient of migrants in Europe, and its European Union partners are groping for answers to the continent's worst refugee crisis since World War Two.

Ever greater numbers of migrants, most fleeing conflict or extreme poverty in Africa or the Middle East, are trying to gain access to the 28-nation bloc, testing its unity and fuelling widespread anti-immigration sentiment.

Germany alone expects the number of asylum seekers to quadruple this year to 800,000, and those towns in the front line say they are already struggling to pay for accommodation and fund medical care for the new arrivals.

Merkel will on Wednesday visit the eastern town of Heidenau where violent anti-refugee protests erupted at the weekend, underlining the urgency of the towns' request for more resources.

Total long-term funding for municipalities could rise as high as 3 billion euros if they get their way when representatives of federal authorities and Germany's 16 regional governments meet on Sept. 24.

Some of Merkel's conservatives also want to change the constitution to allow direct federal payments to municipalities. Currently they are funded at regional level.