Azure functions Azure函数向外扩展期间程序集似乎被卸载的问题

Azure functions Azure函数向外扩展期间程序集似乎被卸载的问题,azure-functions,.net-core-3.1,Azure Functions,.net Core 3.1,我有一个Azure Functions项目,它已经运行了好几个月了,现在刚刚开始出现一个奇怪的问题 首先,当请求开始得到处理(通过事件中心和事件网格触发器)时,一切正常 在我的日志中,我可以看到它在其他情况下正常工作,但在运行几分钟后,它开始失败——但更奇怪的是,在我的函数中收到一批10条事件中心消息的情况下,前2或3条消息因此错误而失败,但其余消息成功 似乎加载程序集有延迟,因为它开始缩放实例,也许 有人觉得熟悉吗 Type specified in JSON 'Candela.Fra

我有一个Azure Functions项目,它已经运行了好几个月了,现在刚刚开始出现一个奇怪的问题

首先,当请求开始得到处理(通过事件中心和事件网格触发器)时,一切正常

在我的日志中,我可以看到它在其他情况下正常工作,但在运行几分钟后,它开始失败——但更奇怪的是,在我的函数中收到一批10条事件中心消息的情况下,前2或3条消息因此错误而失败,但其余消息成功

似乎加载程序集有延迟,因为它开始缩放实例,也许

有人觉得熟悉吗

    Type specified in JSON 'Candela.Frameworks.Knowledge.Models.EntityCommand`2[[Schema.NET.Place, Schema.NET, Version=7.0.0.0, Culture=neutral, PublicKeyToken=fc5550082a9c642c],[Candela.Frameworks.Knowledge.Models.Place, Candela.Frameworks.Knowledge.Models, Version=2020.10.11.5, Culture=neutral, PublicKeyToken=null]], Candela.Frameworks.Knowledge.Models, Version=2020.10.11.5, Culture=neutral, PublicKeyToken=null' is not compatible with 'Candela.Frameworks.Knowledge.Models.EntityCommandBase, Candela.Frameworks.Knowledge.Models, Version=2020.10.11.5, Culture=neutral, PublicKeyToken=null'. Path 'commands[4].$type', line 1, position 2771.
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
       at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
       at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
       at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
       at Candela.Frameworks.Common.Helpers.FromJsonStream[T](ILogger logger, Stream stream) 

可能问题不是卸载程序集,因为我可以看到程序集之间的类型不兼容。你能指定你想要什么或者在这个错误出现之前你做了什么吗?我应该提到,它显示的另一个类型是第一个类型的基类,大多数时候它工作正常。我仍在测试,但我认为这只会在加载时发生,当一个函数应用程序跨实例移动时,或者失败并重新启动时——这就像所有程序集尚未加载到应用程序域时出现的时间延迟。