What is the earliest known instance of a petition directed to Mary? A recent answer on this site says that "People have always prayed to Mary as a chief intercessor on their behalf."  Such a statement will surely seem excessive to Protestants, who would normally characterize the idea of Mary interceding for the living as a (negative) development that took place centuries after Christ.

I doubt that debate will get resolved here, but it still makes me wonder – what is the earliest known instance of a petition directed to Mary?  I am looking for a clear statement where Mary is the actual target of a petition, not that she is tangentially referenced in association with a petition.  I'm not looking for statements of praise directed at Mary.

Checking quickly in Everett Ferguson's Church History, I found the following, which may prove useful as a starting point for answers:


  Mary was invoked in prayer among Greek speakers in the third or fourth century, but the first Latin hymn involving an address to Mary is from the fifth century. (16.2.C)


Notice however that this quote lacks two things that I'm looking for in answers – it doesn't specify that the prayers were petitions, and it doesn't state the documents in which these prayers were recorded.



We have a similar question, When is the first documented case of Christians praying to the dead saints?  However it does not specifically address the question of prayer to Mary, and though Mary is mentioned several times in one answer, she is only praised, never petitioned, in the prayers quoted there (such as from the Liturgy of St. James).
Sub Tuum Praesidium



The earliest known, extant petition prayer to Mary the Θεοτόκος (Theotokos), or Dei Genetrix (the Greek and Latin, respectively, for 'God-bearer' or 'Birthgiver-of-God') is found in an Egyptian papyrus from the 3rd century (commonly dated to around A.D. 250-280 but as late as 300—I could not find a dating later than the 4th century) and contains the prayer to the Blessed Virgin Mary under the title of Theotokos, 'Under Thy Patronage,' which can be seen below:



Rylands Papyrus 470



It is called in Latin Sub Tuum Presidium, and in Greek (in which it was originally written, or thought to have been written) it is called Ὑπὸ τὴν σὴν εὐσπλαγχνίαν (hypo ten sen eusplangnian)—both of which mean 'Under Thy Patronage'.



The Greek version:


  Ὑπὸ τὴν σὴν εὐσπλαγχνίαν καταφεύγομεν Θεοτόκε Τὰς ἡμῶν ἱκεσίας μὴ παρίδῃς ἐν περιστάσει, ἀλλ᾽ ἐκ κινδύνων λύτρωσαι ἡμᾶς μόνη Ἁγνή, μόνη εὐλογημένη
  
  Beneath your compassion, We take refuge, O Mother of God: despise not our petitions in time of trouble: but rescue us from dangers, only pure, only blessed one.


(You can listen to this version being sung here: https://www.youtube.com/watch?v=7SJUVjoyJUU)

The Latin version:


  Sub tuum praesidium confugimus, Sancta Dei Genetrix. Nostras
  deprecationes ne despicias in necessitatibus [nostris*], sed a periculis cunctis
  libera nos semper, Virgo gloriosa et benedicta. Amen.
  
  We fly to thy patronage, O holy Mother of God; despise not our petitions in our necessities, but deliver us always from all dangers, O glorious and blessed Virgin. Amen. 


* Latin for 'our'—retained since some versions contain this.

(You can listen to this version being sung here: https://www.youtube.com/watch?v=gSmykQ9DLOg)



As you can see it asks the Blessed Virgin Mary to not despise our petitions, which means she is the object of their petitioning. The petition is a general one, i.e. to listen to any petition to her, whatever they are (compare this to the prayer Memorare, which bear resemblance to this ancient prayer).

Keep in mind the earliest manuscript evidence for the New Testament is a papyrus dating to A.D. 117-138 (named P52), and that this papryus predates the Ecumenical Council of Ephesus (A.D. 431), which made the reality of Mary's being the Theotokos a dogma of the faith, by almost two centuries.