IMHO, the only humane way to reduce numbers of illegal migrants coming to Europe is to make them legal - but that means the whole of the EU agreeing to a framework that allows it to accommodate whatever numbers of migrants the rest of the world throws at them at any particular time, and that is looking very unlikely right now. The trouble is that the numbers are unpredictable, highly variable, and (it must be said) potentially overwhelming. The migration crisis of 2015-2016 was, in all likelihood, just a taste of things to come and Europe cannot go on much longer without formulating a coherent long-term policy, lest individual member states start closing their borders and putting at risk the core principles that underpin the union, specifically the Free Movement of People.
The EU is caught between aspiring to uphold its own values (which compels it to find a humane solution) and having to respect the views of its own citizens (which compels it to agree to limits, both in terms of absolute numbers and the amount of money it is prepared to spend). Unfortunately, while net migration is a good thing both in terms of demographics and long term economic benefits, it also comes at a (very) high short term cost, both financially and politically. With so many people out of work in countries like Italy, Spain and Greece, it is little wonder that hostility towards migrants is rising, and countries such as Sweden and Germany are already having big problems when it comes to social and cultural integration, fuelling support for right wing parties. This places a hard limit on how many migrants even the most liberal of EU member states are able to take before there is some form of political (or worse, civil) backlash, and makes it hard to see how the EU - who seem to like making rules that cannot be broken - can come up with a permanent solution to an ever-changing issue.