Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSE retry loop when event lines breach 4096 chars #1183

Closed
Synesso opened this issue Sep 3, 2018 · 3 comments · Fixed by #1755
Closed

SSE retry loop when event lines breach 4096 chars #1183

Synesso opened this issue Sep 3, 2018 · 3 comments · Fixed by #1755
Labels
Milestone

Comments

@Synesso
Copy link
Contributor

Synesso commented Sep 3, 2018

Edit:

There are two parts to this.

  1. The client silently fails to parse lines greater than the limit imposed by akka-http. It should have some sort of error behavior. (This may be an akka-http bug). The problem probably also occurs for breaches of the 8k event size limit
  2. The Alpakka SSE module does not provide a mechanism for changing this limit, whereas the underlying akka-http API does. SSE: Allow provision of custom EventStreamUnmarshalling in EventSource #1185 fixes this.

https://github.com/Synesso/alpakka-sse-possible-bug is an MVCE for this bug.

The logic:

    implicit val system = ActorSystem("sse-test")
    implicit val materializer = ActorMaterializer()
    implicit val executionContext = system.dispatcher

    def requestWithDebugging(r: HttpRequest): Future[HttpResponse] = {
      println("\n=== Reconnection ===")
      println("Request headers:")
      val request = r
      request.headers.foreach(h => println(s"* $h"))
      println()
      val f = Http().singleRequest(r)
      f.onComplete {
        case Success(r2) =>
          println("Response headers: ")
          r2.headers.foreach(h => println(s"* $h"))
        case _ =>
      }
      f
    }

    val work: Future[Done] =
      EventSource(Uri("https://horizon.stellar.org/transactions"), requestWithDebugging, Some("85025096736968704"), 1.second)
        .mapConcat{ case ServerSentEvent(data, eventType, id, retry) =>
          print(s"eventType: $eventType, id:$id, retry:$retry, data:$data")
          (if (eventType.contains("open")) None else Some(data)).to[collection.immutable.Iterable]
        }.toMat(Sink.foreach(println))(Keep.right).run()

    work.onComplete(_ => system.terminate())
    Await.ready(system.whenTerminated, Duration.Inf)

There are several subdomains and SSE endpoints under stellar.org. Data is parsed by the SSE adaptor until eventually the component gets into a loop where no more events are found. It seems that the http request headers are correct, but no events are parsed.

Streams that start from the most recent event will run for anywhere up to 10 or 100 events before they meet an event that begins the no-more-events loop. That is to say, 1 event in ~10 to 100 will trigger this bug.

For any given starting event, the results are deterministic. The MVCE shows the bug starting from one of the events that is not processed (id 85025096736968704).

Debugging showed that the failed event was received in akka.http.scaladsl.unmarshalling.sse.LineParser, but I was not able to trace it through to understand why it did not eventuate in a parsed event.

curl -H "Accept: text/event-stream" -H "Last-Event-ID: 85025096736968704" "https://horizon.stellar.org/transactions" shows that there is seemingly valid data from this event.

The same event is parsed by the utility at https://www.stellar.org/laboratory/#explorer?resource=transactions&endpoint=all&values=eyJjdXJzb3IiOiI4NTAyNTA5NjczNjk2ODcwNCIsInN0cmVhbWluZyI6dHJ1ZX0%3D&network=public . This page demonstrates a javascript SSE library parsing the events correctly.

The output of the MVCE shows only the open response is received:

=== Reconnection ===
Request headers:
* Accept: text/event-stream
* Last-Event-ID: 85025096736968704

Response headers: 
* Access-Control-Allow-Origin: *
* Cache-Control: no-cache
* Date: Mon, 03 Sep 2018 10:37:08 GMT
* Vary: Origin
* X-Ratelimit-Limit: 17200
* X-Ratelimit-Remaining: 17199
* X-Ratelimit-Reset: 3599
* Connection: keep-alive
eventType: Some(open), id:None, retry:Some(1000), data:"hello"
=== Reconnection ===
Request headers:
* Accept: text/event-stream
* Last-Event-ID: 85025096736968704

Response headers: 
* Access-Control-Allow-Origin: *
* Cache-Control: no-cache
* Date: Mon, 03 Sep 2018 10:37:10 GMT
* Vary: Origin
* X-Ratelimit-Limit: 17200
* X-Ratelimit-Remaining: 17199
* X-Ratelimit-Reset: 3599
* Connection: keep-alive
eventType: Some(open), id:None, retry:Some(1000), data:"hello"
=== Reconnection ===
Request headers:
* Accept: text/event-stream
* Last-Event-ID: 85025096736968704

Response headers: 
* Access-Control-Allow-Origin: *
* Cache-Control: no-cache
* Date: Mon, 03 Sep 2018 10:37:12 GMT
* Vary: Origin
* X-Ratelimit-Limit: 17200
* X-Ratelimit-Remaining: 17198
* X-Ratelimit-Reset: 3595
* Connection: keep-alive
eventType: Some(open), id:None, retry:Some(1000), data:"hello"

By changing the started event to 85025092442066944 (three events prior), the output shows that the three preceding events are parsed, but it then ceases at the troublesome event.

=== Reconnection ===
Request headers:
* Accept: text/event-stream
* Last-Event-ID: 85025092442066944

Response headers: 
* Access-Control-Allow-Origin: *
* Cache-Control: no-cache
* Date: Mon, 03 Sep 2018 10:38:59 GMT
* Vary: Origin
* X-Ratelimit-Limit: 17200
* X-Ratelimit-Remaining: 17197
* X-Ratelimit-Reset: 3491
* Connection: keep-alive
eventType: Some(open), id:None, retry:Some(1000), data:"hello"eventType: None, id:Some(85025092442071040), retry:None, data:{"_links":{"self":{"href":"https://horizon.stellar.org/transactions/461212d412d8f0bb50497b64ff4b734a764de20bd178a1ad0e7d7768f687bda3"},"account":{"href":"https://horizon.stellar.org/accounts/GB5TAYHHFI4E675NGGB377LLB2AZEADLFXTI7MKUUKBOM3JVFZHXKHOC"},"ledger":{"href":"https://horizon.stellar.org/ledgers/19796447"},"operations":{"href":"https://horizon.stellar.org/transactions/461212d412d8f0bb50497b64ff4b734a764de20bd178a1ad0e7d7768f687bda3/operations{?cursor,limit,order}","templated":true},"effects":{"href":"https://horizon.stellar.org/transactions/461212d412d8f0bb50497b64ff4b734a764de20bd178a1ad0e7d7768f687bda3/effects{?cursor,limit,order}","templated":true},"precedes":{"href":"https://horizon.stellar.org/transactions?order=asc\u0026cursor=85025092442071040"},"succeeds":{"href":"https://horizon.stellar.org/transactions?order=desc\u0026cursor=85025092442071040"}},"id":"461212d412d8f0bb50497b64ff4b734a764de20bd178a1ad0e7d7768f687bda3","paging_token":"85025092442071040","hash":"461212d412d8f0bb50497b64ff4b734a764de20bd178a1ad0e7d7768f687bda3","ledger":19796447,"created_at":"2018-09-03T07:48:14Z","source_account":"GB5TAYHHFI4E675NGGB377LLB2AZEADLFXTI7MKUUKBOM3JVFZHXKHOC","source_account_sequence":"72257735219041344","fee_paid":100,"operation_count":1,"envelope_xdr":"AAAAAHswYOcqOE9/rTGDv/1rDoGSAGst5o+xVKKC5m01Lk91AAAAZAEAtgcAAVRAAAAAAAAAAAAAAAABAAAAAAAAAAEAAAAA4KLHkpmV9SW+n4szdhXLsrXOpPDSWU9Q85b0G6uQYh8AAAABRFJBAAAAAACSqQIEEE0lvhYFPsJxdYVz5AxNoDraze8VLZsFvaBKywAAABgTt2CAAAAAAAAAAAE1Lk91AAAAQGcHfWXTPewmVYjP51UVKg82M2aSvIqNE3TmDD7EfdoBfPCxcVrICVJmg8OuoxAdjif22yk0wV0MmaZjzFTCTQc=","result_xdr":"AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=","result_meta_xdr":"AAAAAAAAAAEAAAAEAAAAAwEuEd4AAAABAAAAAHswYOcqOE9/rTGDv/1rDoGSAGst5o+xVKKC5m01Lk91AAAAAURSQQAAAAAAkqkCBBBNJb4WBT7CcXWFc+QMTaA62s3vFS2bBb2gSssAQx/w5fWnK3//////////AAAAAQAAAAAAAAAAAAAAAQEuEd8AAAABAAAAAHswYOcqOE9/rTGDv/1rDoGSAGst5o+xVKKC5m01Lk91AAAAAURSQQAAAAAAkqkCBBBNJb4WBT7CcXWFc+QMTaA62s3vFS2bBb2gSssAQx/Y0j5Gq3//////////AAAAAQAAAAAAAAAAAAAAAwEuCBsAAAABAAAAAOCix5KZlfUlvp+LM3YVy7K1zqTw0llPUPOW9BurkGIfAAAAAURSQQAAAAAAkqkCBBBNJb4WBT7CcXWFc+QMTaA62s3vFS2bBb2gSssAAAwavxyDwH//////////AAAAAQAAAAAAAAAAAAAAAQEuEd8AAAABAAAAAOCix5KZlfUlvp+LM3YVy7K1zqTw0llPUPOW9BurkGIfAAAAAURSQQAAAAAAkqkCBBBNJb4WBT7CcXWFc+QMTaA62s3vFS2bBb2gSssAAAwy0tPkQH//////////AAAAAQAAAAAAAAAA","fee_meta_xdr":"AAAAAgAAAAMBLhHeAAAAAAAAAAB7MGDnKjhPf60xg7/9aw6BkgBrLeaPsVSiguZtNS5PdQAAAAACgL9eAQC2BwABVD8AAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEBLhHfAAAAAAAAAAB7MGDnKjhPf60xg7/9aw6BkgBrLeaPsVSiguZtNS5PdQAAAAACgL76AQC2BwABVEAAAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==","memo_type":"none","signatures":["Zwd9ZdM97CZViM/nVRUqDzYzZpK8io0TdOYMPsR92gF88LFxWsgJUmaDw66jEB2OJ/bbKTTBXQyZpmPMVMJNBw=="]}{"_links":{"self":{"href":"https://horizon.stellar.org/transactions/461212d412d8f0bb50497b64ff4b734a764de20bd178a1ad0e7d7768f687bda3"},"account":{"href":"https://horizon.stellar.org/accounts/GB5TAYHHFI4E675NGGB377LLB2AZEADLFXTI7MKUUKBOM3JVFZHXKHOC"},"ledger":{"href":"https://horizon.stellar.org/ledgers/19796447"},"operations":{"href":"https://horizon.stellar.org/transactions/461212d412d8f0bb50497b64ff4b734a764de20bd178a1ad0e7d7768f687bda3/operations{?cursor,limit,order}","templated":true},"effects":{"href":"https://horizon.stellar.org/transactions/461212d412d8f0bb50497b64ff4b734a764de20bd178a1ad0e7d7768f687bda3/effects{?cursor,limit,order}","templated":true},"precedes":{"href":"https://horizon.stellar.org/transactions?order=asc\u0026cursor=85025092442071040"},"succeeds":{"href":"https://horizon.stellar.org/transactions?order=desc\u0026cursor=85025092442071040"}},"id":"461212d412d8f0bb50497b64ff4b734a764de20bd178a1ad0e7d7768f687bda3","paging_token":"85025092442071040","hash":"461212d412d8f0bb50497b64ff4b734a764de20bd178a1ad0e7d7768f687bda3","ledger":19796447,"created_at":"2018-09-03T07:48:14Z","source_account":"GB5TAYHHFI4E675NGGB377LLB2AZEADLFXTI7MKUUKBOM3JVFZHXKHOC","source_account_sequence":"72257735219041344","fee_paid":100,"operation_count":1,"envelope_xdr":"AAAAAHswYOcqOE9/rTGDv/1rDo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9eAQC2BwABVD8AAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEBLhHfAAAAAAAAAAB7MGDnKjhPf60xg7/9aw6BkgBrLeaPsVSiguZtNS5PdQAAAAACgL76AQC2BwABVEAAAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==","memo_type":"none","signatures":["Zwd9ZdM97CZViM/nVRUqDzYzZpK8io0TdOYMPsR92gF88LFxWsgJUmaDw66jEB2OJ/bbKTTBXQyZpmPMVMJNBw=="]}
eventType: None, id:Some(85025092442075136), retry:None, data:{"_links":{"self":{"href":"https://horizon.stellar.org/transactions/feb9fb1cd94d2e31b4b77490fd4de61a9e45cdc31731000b867999526d4b389b"},"account":{"href":"https://horizon.stellar.org/accounts/GCAJVEHRAQHT2VBUAFNWY7663I4UPMPUUQ7QUGNXWAFJT5VCOULS3OT2"},"ledger":{"href":"https://horizon.stellar.org/ledgers/19796447"},"operations":{"href":"https://horizon.stellar.org/transactions/feb9fb1cd94d2e31b4b77490fd4de61a9e45cdc31731000b867999526d4b389b/operations{?cursor,limit,order}","templated":true},"effects":{"href":"https://horizon.stellar.org/transactions/feb9fb1cd94d2e31b4b77490fd4de61a9e45cdc31731000b867999526d4b389b/effects{?cursor,limit,order}","templated":true},"precedes":{"href":"https://horizon.stellar.org/transactions?order=asc\u0026cursor=85025092442075136"},"succeeds":{"href":"https://horizon.stellar.org/transactions?order=desc\u0026cursor=85025092442075136"}},"id":"feb9fb1cd94d2e31b4b77490fd4de61a9e45cdc31731000b867999526d4b389b","paging_token":"85025092442075136","hash":"feb9fb1cd94d2e31b4b77490fd4de61a9e45cdc31731000b867999526d4b389b","ledger":19796447,"created_at":"2018-09-03T07:48:14Z","source_account":"GCAJVEHRAQHT2VBUAFNWY7663I4UPMPUUQ7QUGNXWAFJT5VCOULS3OT2","source_account_sequence":"73290455810317573","fee_paid":100,"operation_count":1,"envelope_xdr":"AAAAAICakPEEDz1UNAFbbH/e2jlHsf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A8Qa3FC1APVRlT6Zjc3nPkq3MqCCJljOKZMx8ayekcpAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==","memo_type":"none","signatures":["hGjWmgqp7JNbwXo/E0pfT9Z7N1B8ctEpgr6IJvszLkksLZSWVLhAVHr+1dbWIL78qAPENKlna9CzQUkgiRnyCg=="]}{"_links":{"self":{"href":"https://horizon.stellar.org/transactions/feb9fb1cd94d2e31b4b77490fd4de61a9e45cdc31731000b867999526d4b389b"},"account":{"href":"https://horizon.stellar.org/accounts/GCAJVEHRAQHT2VBUAFNWY7663I4UPMPUUQ7QUGNXWAFJT5VCOULS3OT2"},"ledger":{"href":"https://horizon.stellar.org/ledgers/19796447"},"operations":{"href":"https://horizon.stellar.org/transactions/feb9fb1cd94d2e31b4b77490fd4de61a9e45cdc31731000b867999526d4b389b/operations{?cursor,limit,order}","templated":true},"effects":{"href":"https://horizon.stellar.org/transactions/feb9fb1cd94d2e31b4b77490fd4de61a9e45cdc31731000b867999526d4b389b/effects{?cursor,limit,order}","templated":true},"precedes":{"href":"https://horizon.stellar.org/transactions?order=asc\u0026cursor=85025092442075136"},"succeeds":{"href":"https://horizon.stellar.org/transactions?order=desc\u0026cursor=85025092442075136"}},"id":"feb9fb1cd94d2e31b4b77490fd4de61a9e45cdc31731000b867999526d4b389b","paging_token":"85025092442075136","hash":"feb9fb1cd94d2e31b4b77490fd4de61a9e45cdc31731000b867999526d4b389b","ledger":19796447,"created_at":"2018-09-03T07:48:14Z","source_account":"GCAJVEHRAQHT2VBUAFNWY7663I4UPMPUUQ7QUGNXWAFJT5VCOULS3OT2","source_account_sequence":"73290455810317573","fee_paid":100,"operation_count":1,"envelope_xdr":"AAAAAICakPEEDz1UNAFbbH/e2jlHsfSkPwoZt7AKmfaidRctAAAAZAEEYUgAAB0FAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAiEpJcXCsssc1qOmybu1ONFlN2E7p+kPrqDV6GoffALQAAAAAAOUI0AAAAAAAAAABonUXLQA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vszLkksLZSWVLhAVHr+1dbWIL78qAPENKlna9CzQUkgiRnyCg=="]}
eventType: None, id:Some(85025092442079232), retry:None, data:{"_links":{"self":{"href":"https://horizon.stellar.org/transactions/c6d2423fad90052c99fc399df70906617efce2d7f9e662bd562f3f4ba1a71f25"},"account":{"href":"https://horizon.stellar.org/accounts/GDHKVKHCDUESQVMM7KSQCUGWPKH3IYKZRMALTQZO7YIEW5M6V2IBPQJA"},"ledger":{"href":"https://horizon.stellar.org/ledgers/19796447"},"operations":{"href":"https://horizon.stellar.org/transactions/c6d2423fad90052c99fc399df70906617efce2d7f9e662bd562f3f4ba1a71f25/operations{?cursor,limit,order}","templated":true},"effects":{"href":"https://horizon.stellar.org/transactions/c6d2423fad90052c99fc399df70906617efce2d7f9e662bd562f3f4ba1a71f25/effects{?cursor,limit,order}","templated":true},"precedes":{"href":"https://horizon.stellar.org/transactions?order=asc\u0026cursor=85025092442079232"},"succeeds":{"href":"https://horizon.stellar.org/transactions?order=desc\u0026cursor=85025092442079232"}},"id":"c6d2423fad90052c99fc399df70906617efce2d7f9e662bd562f3f4ba1a71f25","paging_token":"85025092442079232","hash":"c6d2423fad90052c99fc399df70906617efce2d7f9e662bd562f3f4ba1a71f25","ledger":19796447,"created_at":"2018-09-03T07:48:14Z","source_account":"GDHKVKHCDUESQVMM7KSQCUGWPKH3IYKZRMALTQZO7YIEW5M6V2IBPQJA","source_account_sequence":"85022579886129330","fee_paid":100,"operation_count":1,"envelope_xdr":"AAAAAM6qqOIdCShVjPqlAVDWeo+0YVmLALnDLv4QS3WerpAXAAAAZAEuD5YAAACyAAAAAAAAAAEAAAAMb2ZmZXJfdmlhX3NwAAAAAQAAAAAAAAADAAAAAAAAAAFCVEMAAAAAACk6YxqZ1l/IyJjKy6a4PtZxyYYgFSDTXvs0r4N27zYlAAAAAAAAJxAAAARTAjpJrAAAAAAAAAAAAAAAAAAAAAGerpAXAAAAQH2di+X/o2Dr7+5w4fVUYuLJCkJ7UZaoSO2pqvUxU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FQFQr83xr6zQMrk6DiJx6a+DkaFm3BBut1qZakhFm0GzfQDw=="]}{"_links":{"self":{"href":"https://horizon.stellar.org/transactions/c6d2423fad90052c99fc399df70906617efce2d7f9e662bd562f3f4ba1a71f25"},"account":{"href":"https://horizon.stellar.org/accounts/GDHKVKHCDUESQVMM7KSQCUGWPKH3IYKZRMALTQZO7YIEW5M6V2IBPQJA"},"ledger":{"href":"https://horizon.stellar.org/ledgers/19796447"},"operations":{"href":"https://horizon.stellar.org/transactions/c6d2423fad90052c99fc399df70906617efce2d7f9e662bd562f3f4ba1a71f25/operations{?cursor,limit,order}","templated":true},"effects":{"href":"https://horizon.stellar.org/transactions/c6d2423fad90052c99fc399df70906617efce2d7f9e662bd562f3f4ba1a71f25/effects{?cursor,limit,order}","templated":true},"precedes":{"href":"https://horizon.stellar.org/transactions?order=asc\u0026cursor=85025092442079232"},"succeeds":{"href":"https://horizon.stellar.org/transactions?order=desc\u0026cursor=85025092442079232"}},"id":"c6d2423fad90052c99fc399df70906617efce2d7f9e662bd562f3f4ba1a71f25","paging_token":"85025092442079232","hash":"c6d2423fad90052c99fc399df70906617efce2d7f9e662bd562f3f4ba1a71f25","ledger":19796447,"created_at":"2018-09-03T07:48:14Z","source_account":"GDHKVKHCDUESQVMM7KSQCUGWPKH3IYKZRMALTQZO7YIEW5M6V2IBPQJA","source_account_sequence":"85022579886129330","fee_paid":100,"operation_count":1,"envelope_xdr":"AAAAAM6qqOIdCShVjPqlAVDWeo+0YVmLALnDLv4QS3WerpAXAAAAZAEuD5YAAACyAAAAAAAAAAEAAAAMb2ZmZXJfdmlhX3NwAAAAAQAAAAAAAAADAAAAAAAAAAFCVEMAAAAAACk6YxqZ1l/IyJjKy6a4PtZxyYYgFSDTXvs0r4N27zYlAAAAAAAAJxAAAARTAjpJrAAAAAAAAAAAAAAAAAAAAAGerpAXAAAAQH2di+X/o2Dr7+5w4fVUYuLJCkJ7UZaoSO2pqvUxUBUK/N8a+s0DK5Og4icemvg5GhZt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Fm3BBut1qZakhFm0GzfQDw=="]}
eventType: None, id:Some(85025096736968704), retry:None, data:{"_links":{"self":{"href":"https://horizon.stellar.org/transactions/3f3d235cceae0844a6682428f04907d59d76ffda3406c7fb92771a6c4f958aae"},"account":{"href":"https://horizon.stellar.org/accounts/GA4QBU7PEX52BK3ATMG5ZNLB7IVWNZVEGT7ZMZXMB634UI4R26VI26LN"},"ledger":{"href":"https://horizon.stellar.org/ledgers/19796448"},"operations":{"href":"https://horizon.stellar.org/transactions/3f3d235cceae0844a6682428f04907d59d76ffda3406c7fb92771a6c4f958aae/operations{?cursor,limit,order}","templated":true},"effects":{"href":"https://horizon.stellar.org/transactions/3f3d235cceae0844a6682428f04907d59d76ffda3406c7fb92771a6c4f958aae/effects{?cursor,limit,order}","templated":true},"precedes":{"href":"https://horizon.stellar.org/transactions?order=asc\u0026cursor=85025096736968704"},"succeeds":{"href":"https://horizon.stellar.org/transactions?order=desc\u0026cursor=85025096736968704"}},"id":"3f3d235cceae0844a6682428f04907d59d76ffda3406c7fb92771a6c4f958aae","paging_token":"85025096736968704","hash":"3f3d235cceae0844a6682428f04907d59d76ffda3406c7fb92771a6c4f958aae","ledger":19796448,"created_at":"2018-09-03T07:48:20Z","source_account":"GA4QBU7PEX52BK3ATMG5ZNLB7IVWNZVEGT7ZMZXMB634UI4R26VI26LN","source_account_sequence":"72398872139271168","fee_paid":100,"operation_count":1,"envelope_xdr":"AAAAADkA0+8l+6CrYJsN3LVh+itm5qQ0/5Zm7A+3yiOR16qNAAAAZAEBNmQAAAwAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAszwsjFE1+7PFdfmeiL1ESKrxjWrZHpJR/ipvCllbBtgAAAAAAOUI0AAAAAAAAAABkdeqjQAAAEDVhI5SJOhSYtNoGVSB/PLfO1HZCjLQXi0r5rDWspYI3UJqO0gJUCeb5x9TU0zzBQNK+f2SqKgfe2W/8FJ2U0sK","result_xdr":"AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=","result_meta_xdr":"AAAAAAAAAAEAAAADAAAAAAEuEeAAAAAAAAAAALM8LIxRNfuzxXX5noi9REiq8Y1q2R6SUf4qbwpZWwbYAAAAAADlCNABLhHgAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAwEuEeAAAAAAAAAAADkA0+8l+6CrYJsN3LVh+itm5qQ0/5Zm7A+3yiOR16qNAAAAAOlBM3QBATZkAAAMAAAAAAEAAAABAAAAAIQ/AS7GRUBBd96ykumKKUFE92+oiwRuJ7KXuvPwwTQWAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAQEuEeAAAAAAAAAAADkA0+8l+6CrYJsN3LVh+itm5qQ0/5Zm7A+3yiOR16qNAAAAAOhcKqQBATZkAAAMAAAAAAEAAAABAAAAAIQ/AS7GRUBBd96ykumKKUFE92+oiwRuJ7KXuvPwwTQWAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAA","fee_meta_xdr":"AAAAAgAAAAMBLhHfAAAAAAAAAAA5ANPvJfugq2CbDdy1YforZuakNP+WZuwPt8ojkdeqjQAAAADpQTPYAQE2ZAAAC/8AAAABAAAAAQAAAACEPwEuxkVAQXfespLpiilBRPdvqIsEbieyl7rz8ME0FgAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEBLhHgAAAAAAAAAAA5ANPvJfugq2CbDdy1YforZuakNP+WZuwPt8ojkdeqjQAAAADpQTN0AQE2ZAAADAAAAAABAAAAAQAAAACEPwEuxkVAQXfespLpiilBRPdvqIsEbieyl7rz8ME0FgAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==","memo_type":"none","signatures":["1YSOUiToUmLTaBlUgfzy3ztR2Qoy0F4tK+aw1rKWCN1CajtICVAnm+cfU1NM8wUDSvn9kqioH3tlv/BSdlNLCg=="]}{"_links":{"self":{"href":"https://horizon.stellar.org/transactions/3f3d235cceae0844a6682428f04907d59d76ffda3406c7fb92771a6c4f958aae"},"account":{"href":"https://horizon.stellar.org/accounts/GA4QBU7PEX52BK3ATMG5ZNLB7IVWNZVEGT7ZMZXMB634UI4R26VI26LN"},"ledger":{"href":"https://horizon.stellar.org/ledgers/19796448"},"operations":{"href":"https://horizon.stellar.org/transactions/3f3d235cceae0844a6682428f04907d59d76ffda3406c7fb92771a6c4f958aae/operations{?cursor,limit,order}","templated":true},"effects":{"href":"https://horizon.stellar.org/transactions/3f3d235cceae0844a6682428f04907d59d76ffda3406c7fb92771a6c4f958aae/effects{?cursor,limit,order}","templated":true},"precedes":{"href":"https://horizon.stellar.org/transactions?order=asc\u0026cursor=85025096736968704"},"succeeds":{"href":"https://horizon.stellar.org/transactions?order=desc\u0026cursor=85025096736968704"}},"id":"3f3d235cceae0844a6682428f04907d59d76ffda3406c7fb92771a6c4f958aae","paging_token":"85025096736968704","hash":"3f3d235cceae0844a6682428f04907d59d76ffda3406c7fb92771a6c4f958aae","ledger":19796448,"created_at":"2018-09-03T07:48:20Z","source_account":"GA4QBU7PEX52BK3ATMG5ZNLB7IVWNZVEGT7ZMZXMB634UI4R26VI26LN","source_account_sequence":"72398872139271168","fee_paid":100,"operation_count":1,"envelope_xdr":"AAAAADkA0+8l+6CrYJsN3LVh+itm5qQ0/5Zm7A+3yiOR16qNAAAAZAEBNmQAAAwAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAszwsjFE1+7PFdfmeiL1ESKrxjWrZHpJR/ipvCllbBtgAAAAAAOUI0AAAAAAAAAABkdeqjQAAAEDVhI5SJOhSYtNoGVSB/PLfO1HZCjLQXi0r5rDWspYI3UJqO0gJUCeb5x9TU0zzBQNK+f2SqKgfe2W/8FJ2U0sK","result_xdr":"AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=","result_meta_xdr":"AAAAAAAAAAEAAAADAAAAAAEuEeAAAAAAAAAAALM8LIxRNfuzxXX5noi9REiq8Y1q2R6SUf4qbwpZWwbYAAAAAADlCNABLhHgAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAwEuEeAAAAAAAAAAADkA0+8l+6CrYJsN3LVh+itm5qQ0/5Zm7A+3yiOR16qNAAAAAOlBM3QBATZkAAAMAAAAAAEAAAABAAAAAIQ/AS7GRUBBd96ykumKKUFE92+oiwRuJ7KXuvPwwTQWAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAQEuEeAAAAAAAAAAADkA0+8l+6CrYJsN3LVh+itm5qQ0/5Zm7A+3yiOR16qNAAAAAOhcKqQBATZkAAAMAAAAAAEAAAABAAAAAIQ/AS7GRUBBd96ykumKKUFE92+oiwRuJ7KXuvPwwTQWAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAA","fee_meta_xdr":"AAAAAgAAAAMBLhHfAAAAAAAAAAA5ANPvJfugq2CbDdy1YforZuakNP+WZuwPt8ojkdeqjQAAAADpQTPYAQE2ZAAAC/8AAAABAAAAAQAAAACEPwEuxkVAQXfespLpiilBRPdvqIsEbieyl7rz8ME0FgAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEBLhHgAAAAAAAAAAA5ANPvJfugq2CbDdy1YforZuakNP+WZuwPt8ojkdeqjQAAAADpQTN0AQE2ZAAADAAAAAABAAAAAQAAAACEPwEuxkVAQXfespLpiilBRPdvqIsEbieyl7rz8ME0FgAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==","memo_type":"none","signatures":["1YSOUiToUmLTaBlUgfzy3ztR2Qoy0F4tK+aw1rKWCN1CajtICVAnm+cfU1NM8wUDSvn9kqioH3tlv/BSdlNLCg=="]}

=== Reconnection ===
Request headers:
* Accept: text/event-stream
* Last-Event-ID: 85025096736968704

Response headers: 
* Access-Control-Allow-Origin: *
* Cache-Control: no-cache
* Date: Mon, 03 Sep 2018 10:39:01 GMT
* Vary: Origin
* X-Ratelimit-Limit: 17200
* X-Ratelimit-Remaining: 17196
* X-Ratelimit-Reset: 3488
* Connection: keep-alive
eventType: Some(open), id:None, retry:Some(1000), data:"hello"
=== Reconnection ===
...
@Synesso
Copy link
Contributor Author

Synesso commented Sep 3, 2018

OK, this document contains lines that exceed 4096 characters. I do not yet know if that breaches the SSE spec, but regardless the Akka client should show some indication of failure rather than retry forever.

@Synesso
Copy link
Contributor Author

Synesso commented Sep 3, 2018

EventStreamUnmarshalling docs state that max line length can be overridden. However, Alpakka SSE does not expose access to this.

Synesso added a commit to Synesso/alpakka that referenced this issue Sep 3, 2018
@Synesso Synesso changed the title SSE failure to fetch new events SSE retry loop when event lines breach 4096 chars Sep 4, 2018
@ennru ennru added the p:sse label Sep 4, 2018
@2m
Copy link
Member

2m commented Sep 17, 2018

The fix is pending in the akka-http repo: akka/akka-http#2193

ennru added a commit that referenced this issue Jun 20, 2019
* Versions for Scala 2.13.0
* SSE: Akka HTTP change, make actor system available to reach settings #1183
@ennru ennru added this to the 1.0.3 milestone Jun 20, 2019
cheleb pushed a commit to cheleb/alpakka that referenced this issue Jul 5, 2019
* Versions for Scala 2.13.0
* SSE: Akka HTTP change, make actor system available to reach settings akka#1183
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants